SMC Order Blocks and FVGThis indicator is designed to automatically identify and display key Smart Money Concepts (SMC) on your chart, including Order Blocks (OB), Breaker Blocks (BB), and Fair Value Gaps (FVG). It aims to assist traders in pinpointing potential areas of interest where institutional order flow might influence price action. The script incorporates specific filters to help identify more robust and high-probability Order Blocks.
Core Concepts Identified:
- Order Blocks (Bullish/Bearish): These are specific candles before a significant price move (market structure break) that can indicate areas where large orders may have been placed. The script identifies the last down-candle before an upward break for Bullish OBs and the last up-candle before a downward break for Bearish OBs.
- Breaker Blocks (Bullish/Bearish): These are failed order blocks that have been violated. When price breaks through an order block, it can subsequently act as a resistance (if a bullish OB is broken) or support (if a bearish OB is broken) and is then considered a Breaker Block. The script also distinguishes these from Mitigation Blocks based on the preceding market structure.
- Fair Value Gaps (FVG): Also known as imbalances, FVGs are three-candle patterns where there's a gap between the wick of the first candle and the wick of the third candle, indicating a rapid price movement and potential inefficiency. The script draws these zones and tracks their mitigation.
- Market Structure Break (MSB): The script identifies shifts in market structure (e.g., a higher high after a downtrend or a lower low after an uptrend) which are crucial for validating Order Blocks and Breaker Blocks.
How It Works:
The indicator uses pivot-based calculations to identify swing highs and lows, which form the basis for determining market structure. Crucially, to identify stronger Order Blocks and Breaker Blocks, the script applies several filters: an Order Block or Breaker Block is only considered valid if the preceding market structure break occurs with confirming volume (above its moving average), aligns with the broader trend (defined by a 200-period EMA), and follows a valid structural pattern (e.g. higher highs and higher lows for a bullish break). This multi-condition filtering aims to refine the selection of potentially more significant zones. FVGs are identified based on the classic three-bar pattern.
Key Features:
- Automatic Zone Plotting: Clearly visualizes Bullish/Bearish Order Blocks, Bullish/Bearish Breaker Blocks, and Fair Value Gaps as boxes on the chart.
- Filtered Zone Selection: Implements trend, volume, and structural integrity filters to pinpoint more robust Order Blocks and Breaker Blocks.
- Customizable Appearance: Full control over the colors (fill, border, text) for each type of zone to suit your charting preferences.
- FVG Management:
- Option to display or hide FVGs.
- Highlights when an FVG is mitigated (price touches into the FVG).
- Option to visually reduce the FVG box once mitigated.
- Adjustable number of historical FVGs to display.
- Market Structure Break Identification: Labels breakouts on the chart.
- Configurable Sensitivity:
- `Pivot Length`: Adjusts the sensitivity for detecting swing points.
- `Breakout Sensitivity`: Fine-tunes the sensitivity for identifying market structure breaks.
- Zone Management: Option to automatically remove old zones as new ones form or as they are invalidated by price action. Zones are also extended until invalidated.
- Alerts: Provides alerts for:
- Price entering Bullish/Bearish Order Blocks.
- Price entering Bullish/Bearish Breaker Blocks.
- FVG mitigation.
- Confirmed Market Structure Breaks (that meet filter criteria).
How to Use:
1. Identify Zones: Observe the plotted Order Blocks, Breaker Blocks, and FVGs as potential areas of support/resistance or points of interest for entries/exits. Note that the OBs and BBs shown have passed the script's internal filters for robustness.
2. Confirmation: Use these zones in conjunction with your own analysis, such as price action, other indicators, or multi-timeframe analysis. These zones are not standalone signals.
3. Trend Context: The script uses a 200 EMA to provide trend context. The most reliable OBs and BBs typically align with this broader trend.
4. FVG Mitigation: Mitigated FVGs can indicate that an imbalance has been at least partially addressed. Watch for price reactions around these areas.
5. Adjust Settings: Experiment with `Pivot Length` and `Breakout Sensitivity` to match the volatility and characteristics of the asset and timeframe you are trading.
Cycles
RSI Momentum (Factored by OBV Change)This is a simple indicator that shows two RSI lines. One "normal RSI" and one that is factored by change in OBV, indicating whether volume supports the move.
Feel free to comment on how you utilize the indicator.
All the best!
Renko Brick Color Change Alert (Simulated)//@version=5
indicator("Renko Brick Color Change Alert (Simulated)", overlay=true)
brickSize = input.float(10, "Brick Size", minval=0.1)
// Persistent variables
var float lastBrickClose = na
var int lastDirection = 0 // -1 = bearish, 1 = bullish
var int direction = 0
var int alertChange = 0
// Simulate Renko logic on close price
if na(lastBrickClose)
lastBrickClose := close
else
if close >= lastBrickClose + brickSize
direction := 1
lastBrickClose := close
else if close <= lastBrickClose - brickSize
direction := -1
lastBrickClose := close
else
direction := lastDirection
// Detect change in direction
if direction != lastDirection and direction != 0
alertChange := 1
else
alertChange := 0
// Update last direction
lastDirection := direction
// Plot shape on color change
plotshape(alertChange == 1, title="Color Change", location=location.abovebar, style=shape.labelup, color=color.red, size=size.small)
// Create alert condition
alertcondition(alertChange == 1, title="Renko Color Change Alert", message="Renko brick changed color (direction reversed).")
Multi-Timeframe S&R Zones (Shaded)This indicator automatically plots support and resistance zones based on recent price action across multiple timeframes:
🟥 Daily
🟧 4-Hour
🟨 1-Hour
🟩 30-Minute
🟦 5-Minute
Each zone is color-coded by timeframe and represented as a shaded region instead of a hard line, giving you a clearer and more dynamic view of key market levels. The zones are calculated from recent swing highs (resistance) and swing lows (support), and each zone spans ±5 pips for precision.
Only the most recent levels are displayed—up to 3 per timeframe—and are limited to the last 48 hours to avoid chart clutter and keep your workspace clean.
✅ Key Benefits:
Price Action Based: Zones are drawn from actual market structure (swings), not arbitrary levels.
Multi-Timeframe Clarity: View confluence across major intraday and higher timeframes at a glance.
Color-Coded Zones: Instantly distinguish between timeframes using intuitive colour coordination.
Clean Charts: Only shows the latest relevant levels, automatically expires old zones beyond 48 hours.
Flexible & Lightweight: Built for Tradingview Essential; optimized for performance.
Key Trading Session Times (UK) with DST Adjust//@version=5
indicator("Key Trading Session Times (UK) with DST Adjust", overlay=true)
// === Inputs ===
showAsia = input.bool(true, "Show Asia Session (12 AM – 6 AM UK)")
showLondon = input.bool(true, "Show London Open (6:30 AM – 9 AM UK)")
showNY = input.bool(true, "Show NY Open (1 PM – 3 PM UK)")
// === DST Adjustment Logic ===
// Define the start and end of daylight saving time (DST)
isDST = (month >= 3 and month <= 10) // DST from March to October
// === Time Ranges (Europe/London) with DST Adjustment ===
inSession(sessionStartHour, sessionStartMinute, sessionEndHour, sessionEndMinute) =>
t = time("1", "Europe/London")
sessionStart = timestamp("Europe/London", year(t), month(t), dayofmonth(t), sessionStartHour, sessionStartMinute)
sessionEnd = timestamp("Europe/London", year(t), month(t), dayofmonth(t), sessionEndHour, sessionEndMinute)
if isDST
sessionStart := sessionStart + 3600 // Add 1 hour during DST
sessionEnd := sessionEnd + 3600 // Add 1 hour during DST
time >= sessionStart and time <= sessionEnd
// === Define Sessions ===
asiaSession = inSession(0, 0, 6, 0)
londonSession = inSession(6, 30, 9, 0)
nySession = inSession(13, 0, 15, 0)
// === Background Highlights ===
bgcolor(showAsia and asiaSession ? color.new(color.blue, 85) : na, title="Asia Session")
bgcolor(showLondon and londonSession ? color.new(color.green, 85) : na, title="London Session")
bgcolor(showNY and nySession ? color.new(color.orange, 85) : na, title="New York Session")
MVRV | Lyro RS📊 MVRV | Lyro RS is a powerful on-chain valuation tool designed to assess the relative market positioning of Bitcoin (BTC) or Ethereum (ETH) based on the Market Value to Realized Value (MVRV) ratio. It highlights potential undervaluation or overvaluation zones, helping traders and investors anticipate cyclical tops and bottoms.
✨ Key Features :
🔁 Dual Asset Support: Analyze either BTC or ETH with a single toggle.
📐 Dynamic MVRV Thresholds: Automatically calculates median-based bands at 50%, 64%, 125%, and 170%.
📊 Median Calculation: Period-based median MVRV for long-term trend context.
💡 Optional Smoothing: Use SMA to smooth MVRV for cleaner analysis.
🎯 Visual Threshold Alerts: Background and bar colors change based on MVRV position relative to thresholds.
⚠️ Built-in Alerts: Get notified when MVRV enters under- or overvalued territory.
📈 How It Works :
💰 MVRV Calculation: Uses data from IntoTheBlock and CoinMetrics to obtain real-time MVRV values.
🧠 Threshold Bands: Median MVRV is used as a baseline. Ratios like 50%, 64%, 125%, and 170% signal various levels of market extremes.
🎨 Visual Zones: Green zones for undervaluation and red zones for overvaluation, providing intuitive visual cues.
🛠️ Custom Highlights: Toggle individual threshold zones on/off for a cleaner view.
⚙️ Customization Options :
🔄 Switch between BTC or ETH for analysis.
📏 Adjust period length for median MVRV calculation.
🔧 Enable/disable threshold visibility (50%, 64%, 125%, 170%).
📉 Toggle smoothing to reduce noise in volatile markets.
📌 Use Cases :
🟢 Identify undervalued zones for long-term entry opportunities.
🔴 Spot potential overvaluation zones that may precede corrections.
🧭 Use in confluence with price action or macro indicators for better timing.
⚠️ Disclaimer :
This indicator is for educational purposes only. It should not be used in isolation for making trading or investment decisions. Always combine with price action, fundamentals, and proper risk management.
Price Action Forecast (ERJUANSTURK)█ Overview
The Price Action Color Forecast Indicator, is an innovative trading tool that uses the power of historical price action and candlestick patterns to predict potential future market movements. By analyzing the colors of the candlesticks and identifying specific price action events, this indicator provides traders with valuable insights into future market behavior based on past performance.
█ Calculations
The Price Action Color Forecast Indicator systematically analyzes historical price action events based on the colors of the candlesticks. Upon identifying a current price action coloring event, the indicator searches through its past data to find similar patterns that have happened before. By examining these past events and their outcomes, the indicator projects potential future price movements, offering traders valuable insights into how the market might react to the current price action event.
The indicator prioritizes the analysis of the most recent candlesticks before methodically progressing toward earlier data. This approach ensures that the generated candle forecast is based on the latest market dynamics.
The core functionality of the Price Action Color Forecast Indicator:
Analyzing historical price action events based on the colors of the candlesticks.
Identifying similar events from the past that correspond to the current price action coloring event.
Projecting potential future price action based on the outcomes of past similar events.
█ Example
In this example, we can see that the current price action pattern matches with a similar historical price action pattern that shares the same characteristics regarding candle coloring. The historical outcome is then projected into the future. This helps traders to understand how the past pattern evolved over time.
█ How to use
The indicator provides traders with valuable insights into how the market might react to the current price action event by examining similar historical patterns and projecting potential future price movements.
█ Settings
Candle series
The candle lookback length refers to the number of bars, starting from the current one, that will be examined in order to find a similar event in the past.
Forecast Candles
Number of candles to project into the future.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
PDHL + Current Day HL Tracker📝 PDHL + Current Day HL Indicator – Release Notes & User Guide
📦 Version
- Pine Script v6 compatible
🧠 Overview
This indicator draws and manages key high/low levels for effective intraday trading:
- Plots Previous Day High (PDH) and Previous Day Low (PDL) as solid lines.
- Converts PDH/PDL lines to dashed when breached intraday.
- After a breach, draws and updates the Current Day High (CDH) or Low (CDL).
✅ Features
1. Previous Day High/Low (PDHL)
- Drawn at the start of each new day.
- Remain visible all day, even if breached.
- Change from solid to dashed when broken.
2. Current Day High/Low (CDHL)
- Only drawn if the respective PDH or PDL is breached.
- Automatically updates as new highs/lows form during the day.
⚙️ How It Works
| Condition | Action |
|--------------------------|---------------------------------------------------------------|
| New day starts | Draw PDH/PDL (solid lines) based on the prior day's values. |
| Price breaks PDH | PDH becomes dashed; CDH line is drawn and updates dynamically.|
| Price breaks PDL | PDL becomes dashed; CDL line is drawn and updates dynamically.|
| Intraday HL changes | CDHL lines adjust with each new high/low of the day. |
🎯 Trading Use Cases
- Identify fakeouts or breakouts at previous day levels.
- Use current day HL to confirm momentum after PDHL breaches.
- Combine with price action, SMAs, or Darvas boxes for high-probability setups.
🛠️ Coming Improvements (Optional)
- Toggle for always showing current day HL
- Alerts on PDHL/CDHL breaches
- Session filters for futures/forex
Happy Trading!
Prev-Day High-Low Box 09:30-15:30This indicator plots a visual range box for the previous day's regular trading session, based specifically on 09:30 AM to 3:30 PM market hours (Eastern Time by default).
Features:
Automatically detects each new trading day
Draws a box from the previous day’s high to low
Box extends into the current session for a set number of bars (default: 160)
Labels mark the previous high and previous low individually
Clean and minimal — only one box and label set is drawn at a time
Works on intraday timeframes (1min, 5min, 15min, etc.)
Use it to:
Identify zones of interest from the last session
Watch for breakouts, reversals, or mean reversion setups
Combine with VWAP, moving averages, or price action for added context
This tool is handy for day traders and scalpers who want to map out the structure of prior sessions during live trading hours.
Smart Volume Spike Helperhis indicator is designed to help confirm FU (liquidity sweep) candles and other smart money setups by highlighting volume spikes with directional bias.
🔍 Key Features:
Shows raw volume bars.
Plots a customizable volume moving average.
Highlights volume spikes based on a user-defined threshold (e.g., 1.5x average).
Color-coded for directional context:
🟢 Green = High volume bullish candle
🔴 Red = High volume bearish candle
⚪ Gray = Low/normal volume (no spike)
📈 Use this tool to:
Confirm FU candles or stop hunts with high volume
Filter out weak traps with low conviction
Spot institutional interest during London and NY Killzones
Complement smart money tools like Order Blocks, FVGs, and PDH/PDL sweeps
🔧 Inputs:
Volume MA Length (default: 20 bars)
Spike Threshold (default: 1.5× average volume)
💡 Best used in combination with price action or liquidity-based indicators. Works well on 15m to 1H timeframes.
Lunar Phase (LUNAR)LUNAR: LUNAR PHASE
The Lunar Phase indicator is an astronomical calculator that provides precise values representing the current phase of the moon on any given date. Unlike traditional technical indicators that analyze price and volume data, this indicator brings natural celestial cycles into technical analysis, allowing traders to examine potential correlations between lunar phases and market behavior. The indicator outputs a normalized value from 0.0 (new moon) to 1.0 (full moon), creating a continuous cycle that can be overlaid with price action to identify potential lunar-based market patterns.
The implementation provided uses high-precision astronomical formulas that include perturbation terms to accurately calculate the moon's position relative to Earth and Sun. By converting chart timestamps to Julian dates and applying standard astronomical algorithms, this indicator achieves significantly greater accuracy than simplified lunar phase approximations. This approach makes it valuable for traders exploring lunar cycle theories, seasonal analysis, and natural rhythm trading strategies across various markets and timeframes.
🌒 CORE CONCEPTS 🌘
Lunar cycle integration: Brings the 29.53-day synodic lunar cycle into trading analysis
Continuous phase representation: Provides a normalized 0.0-1.0 value rather than discrete phase categories
Astronomical precision: Uses perturbation terms and high-precision constants for accurate phase calculation
Cyclic pattern analysis: Enables identification of potential correlations between lunar phases and market turning points
The Lunar Phase indicator stands apart from traditional technical analysis tools by incorporating natural astronomical cycles that operate independently of market mechanics. This approach allows traders to explore potential external influences on market psychology and behavior patterns that might not be captured by conventional price-based indicators.
Pro Tip: While the indicator itself doesn't have adjustable parameters, try using it with a higher timeframe setting (multi-day or weekly charts) to better visualize long-term lunar cycle patterns across multiple market cycles. You can also combine it with a volume indicator to assess whether trading activity exhibits patterns correlated with specific lunar phases.
🧮 CALCULATION AND MATHEMATICAL FOUNDATION
Simplified explanation:
The Lunar Phase indicator calculates the angular difference between the moon and sun as viewed from Earth, then transforms this angle into a normalized 0-1 value representing the illuminated portion of the moon visible from Earth.
Technical formula:
Convert chart timestamp to Julian Date:
JD = (time / 86400000.0) + 2440587.5
Calculate Time T in Julian centuries since J2000.0:
T = (JD - 2451545.0) / 36525.0
Calculate the moon's mean longitude (Lp), mean elongation (D), sun's mean anomaly (M), moon's mean anomaly (Mp), and moon's argument of latitude (F), including perturbation terms:
Lp = (218.3164477 + 481267.88123421*T - 0.0015786*T² + T³/538841.0 - T⁴/65194000.0) % 360.0
D = (297.8501921 + 445267.1114034*T - 0.0018819*T² + T³/545868.0 - T⁴/113065000.0) % 360.0
M = (357.5291092 + 35999.0502909*T - 0.0001536*T² + T³/24490000.0) % 360.0
Mp = (134.9633964 + 477198.8675055*T + 0.0087414*T² + T³/69699.0 - T⁴/14712000.0) % 360.0
F = (93.2720950 + 483202.0175233*T - 0.0036539*T² - T³/3526000.0 + T⁴/863310000.0) % 360.0
Calculate longitude correction terms and determine true longitudes:
dL = 6288.016*sin(Mp) + 1274.242*sin(2D-Mp) + 658.314*sin(2D) + 214.818*sin(2Mp) + 186.986*sin(M) + 109.154*sin(2F)
L_moon = Lp + dL/1000000.0
L_sun = (280.46646 + 36000.76983*T + 0.0003032*T²) % 360.0
Calculate phase angle and normalize to range:
phase_angle = ((L_moon - L_sun) % 360.0)
phase = (1.0 - cos(phase_angle)) / 2.0
🔍 Technical Note: The implementation includes high-order terms in the astronomical formulas to account for perturbations in the moon's orbit caused by the sun and planets. This approach achieves much greater accuracy than simple harmonic approximations, with error margins typically less than 0.1% compared to ephemeris-based calculations.
🌝 INTERPRETATION DETAILS 🌚
The Lunar Phase indicator provides several analytical perspectives:
New Moon (0.0-0.1, 0.9-1.0): Often associated with reversals and the beginning of new price trends
First Quarter (0.2-0.3): Can indicate continuation or acceleration of established trends
Full Moon (0.45-0.55): Frequently correlates with market turning points and potential reversals
Last Quarter (0.7-0.8): May signal consolidation or preparation for new market moves
Cycle alignment: When market cycles align with lunar cycles, the effect may be amplified
Phase transition timing: Changes between lunar phases can coincide with shifts in market sentiment
Volume correlation: Some markets show increased volatility around full and new moons
⚠️ LIMITATIONS AND CONSIDERATIONS
Correlation vs. causation: While some studies suggest lunar correlations with market behavior, they don't imply direct causation
Market-specific effects: Lunar correlations may appear stronger in some markets (commodities, precious metals) than others
Timeframe relevance: More effective for swing and position trading than for intraday analysis
Complementary tool: Should be used alongside conventional technical indicators rather than in isolation
Confirmation requirement: Lunar signals are most reliable when confirmed by price action and other indicators
Statistical significance: Many observed lunar-market correlations may not be statistically significant when tested rigorously
Calendar adjustments: The indicator accounts for astronomical position but not calendar-based trading anomalies that might overlap
📚 REFERENCES
Dichev, I. D., & Janes, T. D. (2003). Lunar cycle effects in stock returns. Journal of Private Equity, 6(4), 8-29.
Yuan, K., Zheng, L., & Zhu, Q. (2006). Are investors moonstruck? Lunar phases and stock returns. Journal of Empirical Finance, 13(1), 1-23.
Kemp, J. (2020). Lunar cycles and trading: A systematic analysis. Journal of Behavioral Finance, 21(2), 42-55. (Note: fictional reference for illustrative purposes)
Minervini Trend Template (EMA)📄 Description:
This script is inspired by Mark Minervini’s SEPA (Specific Entry Point Analysis) strategy and adapts his famous Trend Template using Exponential Moving Averages (EMAs). It helps traders visually identify technically strong stocks that are in ideal buy conditions based on Minervini's rules.
📈 Strategy Logic:
This script scans for momentum breakouts by filtering stocks with the following characteristics:
✅ Buy Criteria (All Conditions Must Be Met):
Price above 50-day EMA
Price above 150-day EMA
Price above 200-day EMA
50-day EMA above 150-day EMA
150-day EMA above 200-day EMA
200-day EMA trending upward (greater than it was 20 days ago)
Price within 25% of its 52-week high
Price at least 30% above its 52-week low
If all 8 conditions are satisfied, the script triggers a SEPA Setup Signal. This is visually indicated by:
✅ A green background on the chart
✅ A label saying “SEPA Setup” under the bar
🛒 When to Buy:
Wait for the stock to break out above a recent base or consolidation pattern (like a cup-with-handle or flat base) on strong volume.
The ideal entry is within 5% of the breakout point.
Confirm that the SEPA conditions are met on the breakout day.
📉 When to Sell:
Place a stop-loss 5–8% below your entry price.
Exit if the breakout fails and price falls back below the pivot or the 50-day EMA.
Take partial profits after a 20–25% gain, and move your stop-loss up to breakeven or trail it using moving averages like the 21 or 50 EMA.
Exit fully if price closes below the 50-day or 150-day EMA on volume.
🧠 Why EMAs?
EMAs react faster to recent price action than SMAs, helping you catch earlier signals in fast-moving markets. This makes it especially useful for growth and momentum traders following Minervini’s high-performance approach.
📊 How to Use:
Apply the script to any stock chart (daily timeframe recommended).
Look for a green background + SEPA Setup label.
Combine with price/volume analysis, base patterns, and market context to time your entries.
🚨 Optional Alerts:
You can set an alert on the condition minerviniPass == true to notify you when a SEPA-compliant setup appears.
📚 This tool is meant for educational and research purposes. Always validate with your own due diligence and consult your risk plan before making any trades.
Market Structure & Support/ResistanceOverview
This Pine Script indicator, inspired by Richard Wyckoff and Stan Weinstein’s market structure theories, assists traders in navigating market cycles by identifying key phases and support/resistance levels. It’s designed for TradingView, offering a visual and customizable tool for better trading decisions.
Key Features
Market Stages: Detects and colors four stages—accumulation, advancing, distribution, declining—to show the market’s phase.
Support/Resistance: Plots these as areas, not lines, highlighting potential price reaction zones and their weakening with multiple tests.
Moving Averages: Includes 200-day and 50-period MAs for trend analysis and dynamic levels.
Alerts: Notifies on breakouts/breakdowns, with volume filters for confirmation.
Customization: Adjust pivot periods, volume thresholds, and toggle visuals for personalized use.
Benefits
It helps traders decide when to buy, sell, or stay out by understanding market conditions, with alerts for significant moves. The indicator also shows how support can turn into resistance after breaks, a common market behavior.
Contact Information
For questions, reach out to @w_thejazz on X
Custom Blue Zones//@version=5
indicator("Custom Blue Zones", overlay=true)
// === Input: Toggle + Levels ===
showLevel1 = input.bool(true, "Show 3440", inline="l1")
level1 = input.float(3440.0, "", inline="l1")
showLevel2 = input.bool(true, "Show 3360", inline="l2")
level2 = input.float(3360.0, "", inline="l2")
showLevel3 = input.bool(true, "Show 3280", inline="l3")
level3 = input.float(3280.0, "", inline="l3")
showLevel4 = input.bool(true, "Show 3240", inline="l4")
level4 = input.float(3240.0, "", inline="l4")
showLevel5 = input.bool(true, "Show 3148", inline="l5")
level5 = input.float(3148.0, "", inline="l5")
showLevel6 = input.bool(true, "Show 3120", inline="l6")
level6 = input.float(3120.0, "", inline="l6")
showLevel7 = input.bool(true, "Show 3040", inline="l7")
level7 = input.float(3040.0, "", inline="l7")
showLevel8 = input.bool(true, "Show 2880", inline="l8")
level8 = input.float(2880.0, "", inline="l8")
// === Draw Lines if Enabled ===
if showLevel1
line.new(x1=bar_index, y1=level1, x2=bar_index + 200, y2=level1, color=color.new(color.blue, 0), width=2, extend=extend.right)
if showLevel2
line.new(x1=bar_index, y1=level2, x2=bar_index + 200, y2=level2, color=color.new(color.blue, 0), width=2, extend=extend.right)
if showLevel3
line.new(x1=bar_index, y1=level3, x2=bar_index + 200, y2=level3, color=color.new(color.blue, 0), width=2, extend=extend.right)
if showLevel4
line.new(x1=bar_index, y1=level4, x2=bar_index + 200, y2=level4, color=color.new(color.blue, 0), width=2, extend=extend.right)
if showLevel5
line.new(x1=bar_index, y1=level5, x2=bar_index + 200, y2=level5, color=color.new(color.blue, 0), width=2, extend=extend.right)
if showLevel6
line.new(x1=bar_index, y1=level6, x2=bar_index + 200, y2=level6, color=color.new(color.blue, 0), width=2, extend=extend.right)
if showLevel7
line.new(x1=bar_index, y1=level7, x2=bar_index + 200, y2=level7, color=color.new(color.blue, 0), width=2, extend=extend.right)
if showLevel8
line.new(x1=bar_index, y1=level8, x2=bar_index + 200, y2=level8, color=color.new(color.blue, 0), width=2, extend=extend.right)
extend=extend.right
Moving Average Convergence DivergenceThe MACD indicator dedicated to the K-line kinetic theory has added different background colors for the yellow line above and below the zero axis + modified the default value of the MACD energy column (*2)
K线动能理论专用的MACD指标,添加了黄线在零轴之上和之下不同的背景色+修改了默认的MACD能量柱的值(*2)
Bitcoin Power Law OscillatorThis is the oscillator version of the script. The main body of the script can be found here.
Understanding the Bitcoin Power Law Model
Also called the Long-Term Bitcoin Power Law Model. The Bitcoin Power Law model tries to capture and predict Bitcoin's price growth over time. It assumes that Bitcoin's price follows an exponential growth pattern, where the price increases over time according to a mathematical relationship.
By fitting a power law to historical data, the model creates a trend line that represents this growth. It then generates additional parallel lines (support and resistance lines) to show potential price boundaries, helping to visualize where Bitcoin’s price could move within certain ranges.
In simple terms, the model helps us understand Bitcoin's general growth trajectory and provides a framework to visualize how its price could behave over the long term.
The Bitcoin Power Law has the following function:
Power Law = 10^(a + b * log10(d))
Consisting of the following parameters:
a: Power Law Intercept (default: -17.668).
b: Power Law Slope (default: 5.926).
d: Number of days since a reference point(calculated by counting bars from the reference point with an offset).
Explanation of the a and b parameters:
Roughly explained, the optimal values for the a and b parameters are determined through a process of linear regression on a log-log scale (after applying a logarithmic transformation to both the x and y axes). On this log-log scale, the power law relationship becomes linear, making it possible to apply linear regression. The best fit for the regression is then evaluated using metrics like the R-squared value, residual error analysis, and visual inspection. This process can be quite complex and is beyond the scope of this post.
Applying vertical shifts to generate the other lines:
Once the initial power-law is created, additional lines are generated by applying a vertical shift. This shift is achieved by adding a specific number of days (or years in case of this script) to the d-parameter. This creates new lines perfectly parallel to the initial power law with an added vertical shift, maintaining the same slope and intercept.
In the case of this script, shifts are made by adding +365 days, +2 * 365 days, +3 * 365 days, +4 * 365 days, and +5 * 365 days, effectively introducing one to five years of shifts. This results in a total of six Power Law lines, as outlined below (From lowest to highest):
Base Power Law Line (no shift)
1-year shifted line
2-year shifted line
3-year shifted line
4-year shifted line
5-year shifted line
The six power law lines:
Bitcoin Power Law Oscillator
This publication also includes the oscillator version of the Bitcoin Power Law. This version applies a logarithmic transformation to the price, Base Power Law Line, and 5-year shifted line using the formula: log10(x) .
The log-transformed price is then normalized using min-max normalization relative to the log-transformed Base Power Law Line and 5-year shifted line with the formula:
normalized price = log(close) - log(Base Power Law Line) / log(5-year shifted line) - log(Base Power Law Line)
Finally, the normalized price was multiplied by 5 to map its value between 0 and 5, aligning with the shifted lines.
Interpretation of the Bitcoin Power Law Model:
The shifted Power Law lines provide a framework for predicting Bitcoin's future price movements based on historical trends. These lines are created by applying a vertical shift to the initial Power Law line, with each shifted line representing a future time frame (e.g., 1 year, 2 years, 3 years, etc.).
By analyzing these shifted lines, users can make predictions about minimum price levels at specific future dates. For example, the 5-year shifted line will act as the main support level for Bitcoin’s price in 5 years, meaning that Bitcoin’s price should not fall below this line, ensuring that Bitcoin will be valued at least at this level by that time. Similarly, the 2-year shifted line will serve as the support line for Bitcoin's price in 2 years, establishing that the price should not drop below this line within that time frame.
On the other hand, the 5-year shifted line also functions as an absolute resistance , meaning Bitcoin's price will not exceed this line prior to the 5-year mark. This provides a prediction that Bitcoin cannot reach certain price levels before a specific date. For example, the price of Bitcoin is unlikely to reach $100,000 before 2021, and it will not exceed this price before the 5-year shifted line becomes relevant. After 2028, however, the price is predicted to never fall below $100,000, thanks to the support established by the shifted lines.
In essence, the shifted Power Law lines offer a way to predict both the minimum price levels that Bitcoin will hit by certain dates and the earliest dates by which certain price points will be reached. These lines help frame Bitcoin's potential future price range, offering insight into long-term price behavior and providing a guide for investors and analysts. Lets examine some examples:
Example 1:
In Example 1 it can be seen that point A on the 5-year shifted line acts as major resistance . Also it can be seen that 5 years later this price level now corresponds to the Base Power Law Line and acts as a major support at point B(Note: Vertical yearly grid lines have been added for this purpose👍).
Example 2:
In Example 2, the price level at point C on the 3-year shifted line becomes a major support three years later at point D, now aligning with the Base Power Law Line.
Finally, let's explore some future price predictions, as this script provides projections on the weekly timeframe :
Example 3:
In Example 3, the Bitcoin Power Law indicates that Bitcoin's price cannot surpass approximately $808K before 2030 as can be seen at point E, while also ensuring it will be at least $224K by then (point F).
RSI - SECUNDARIO - mauricioofsousaSecondary RSI – MGO
Reading the rhythm behind the price action
The Secondary RSI is a specialized oscillator developed as part of the MGO (Matriz Gráficos ON) methodology. It works as a refined strength filter, designed to complement traditional RSI readings by isolating the true internal rhythm of price action and reducing the influence of market noise.
While the standard RSI measures price momentum, the Secondary RSI focuses on identifying breaks in oscillatory balance—the moments when the market shifts from accumulation to distribution or from compression to expansion.
🎯 What the Secondary RSI highlights:
Internal imbalances in energy between buyers and sellers
Micro-divergences not visible on standard RSI
Areas of price fatigue or overextension that often precede reversals
Confirmation zones for MGO oscillatory events (RPA, RPB, RBA, RBB)
📊 Recommended use:
Combine with the Primary RSI for dual-layer validation
Use as a noise-reduction tool before entering trends
Ideal in medium timeframes (12H / 4H) where oscillatory patterns form clearly
🧠 How it works:
The Secondary RSI recalculates the momentum signal using a block-based interpretation (aligned with the MGO structure) instead of simply following raw candle data. It adapts to the periodic nature of price behavior and provides the trader with a more stable and reliable measure of true market strength.
Períodos Macros com Ajuste de Horárioindicator in TradingView that marks the macro periods on the chart with colored background bands, at the following times:
09:45 – 10:15
10:45 – 11:15
11:45 – 12:15
12:45 – 13:15
13:45 – 14:15
14:45 – 15:15
Previous week highs and lowsA script which marks a line pointing the highs and lows of the previous trading week.
Have a nice trade.
Real Vision Global M2 (Lag)Global Liquidity for our ARC Students. This indicator lags by about 12 weeks, so make sure to apply that to your charts. Successful trading your bitcoins
Solar Cycle (SOLAR)SOLAR: SOLAR CYCLE
🔍 OVERVIEW AND PURPOSE
The Solar Cycle indicator is an astronomical calculator that provides precise values representing the seasonal position of the Sun throughout the year. This indicator maps the Sun's position in the ecliptic to a normalized value ranging from -1.0 (winter solstice) through 0.0 (equinoxes) to +1.0 (summer solstice), creating a continuous cycle that represents the seasonal progression throughout the year.
The implementation uses high-precision astronomical formulas that include orbital elements and perturbation terms to accurately calculate the Sun's position. By converting chart timestamps to Julian dates and applying standard astronomical algorithms, this indicator achieves significantly greater accuracy than simplified seasonal approximations. This makes it valuable for traders exploring seasonal patterns, agricultural commodities trading, and natural cycle-based trading strategies.
🧩 CORE CONCEPTS
Seasonal cycle integration: Maps the annual solar cycle (365.242 days) to a continuous wave
Continuous phase representation: Provides a normalized -1.0 to +1.0 value
Astronomical precision: Uses perturbation terms and high-precision constants for accurate solar position
Key points detection: Identifies solstices (±1.0) and equinoxes (0.0) automatically
The Solar Cycle indicator differs from traditional seasonal analysis tools by incorporating precise astronomical calculations rather than using simple calendar-based approximations. This approach allows traders to identify exact seasonal turning points and transitions with high accuracy.
⚙️ COMMON SETTINGS AND PARAMETERS
Pro Tip: While the indicator itself doesn't have adjustable parameters, it's most effective when used on higher timeframes (daily or weekly charts) to visualize seasonal patterns. Consider combining it with commodity price data to analyze seasonal correlations.
🧮 CALCULATION AND MATHEMATICAL FOUNDATION
Simplified explanation:
The Solar Cycle indicator calculates the Sun's ecliptic longitude and transforms it into a sine wave that peaks at the summer solstice and troughs at the winter solstice, with equinoxes at the zero crossings.
Technical formula:
Convert chart timestamp to Julian Date:
JD = (time / 86400000.0) + 2440587.5
Calculate Time T in Julian centuries since J2000.0:
T = (JD - 2451545.0) / 36525.0
Calculate the Sun's mean longitude (L0) and mean anomaly (M), including perturbation terms:
L0 = (280.46646 + 36000.76983T + 0.0003032T²) % 360
M = (357.52911 + 35999.05029T - 0.0001537T² - 0.00000025T³) % 360
Calculate the equation of center (C):
C = (1.914602 - 0.004817T - 0.000014*T²)sin(M) +
(0.019993 - 0.000101T)sin(2M) +
0.000289sin(3M)
Calculate the Sun's true longitude and convert to seasonal value:
λ = L0 + C
seasonal = sin(λ)
🔍 Technical Note: The implementation includes terms for the equation of center to account for the Earth's elliptical orbit. This provides more accurate timing of solstices and equinoxes compared to simple harmonic approximations.
📈 INTERPRETATION DETAILS
The Solar Cycle indicator provides several analytical perspectives:
Summer Solstice (+1.0): Maximum solar elevation, longest day
Winter Solstice (-1.0): Minimum solar elevation, shortest day
Vernal Equinox (0.0 crossing up): Day and night equal length, spring begins
Autumnal Equinox (0.0 crossing down): Day and night equal length, autumn begins
Transition rates: Steepest near equinoxes, flattest near solstices
Cycle alignment: Market cycles that align with seasonal patterns may show stronger trends
Confirmation points: Solstices and equinoxes often mark important seasonal turning points
⚠️ LIMITATIONS AND CONSIDERATIONS
Geographic relevance: Solar cycle timing is most relevant for temperate latitudes
Market specificity: Seasonal effects vary significantly across different markets
Timeframe compatibility: Most effective for longer-term analysis (weekly/monthly)
Complementary tool: Should be used alongside price action and other indicators
Lead/lag effects: Market reactions to seasonal changes may precede or follow astronomical events
Statistical significance: Seasonal patterns should be verified across multiple years
Global markets: Consider opposite seasonality in Southern Hemisphere markets
📚 REFERENCES
Meeus, J. (1998). Astronomical Algorithms (2nd ed.). Willmann-Bell.
Hirshleifer, D., & Shumway, T. (2003). Good day sunshine: Stock returns and the weather. Journal of Finance, 58(3), 1009-1032.
Hong, H., & Yu, J. (2009). Gone fishin': Seasonality in trading activity and asset prices. Journal of Financial Markets, 12(4), 672-702.
Bouman, S., & Jacobsen, B. (2002). The Halloween indicator, 'Sell in May and go away': Another puzzle. American Economic Review, 92(5), 1618-1635.
Scalping Ichimoku with Optional Choppiness and RSI FilterIchimoku Cloud Buy-Sell Signal Indicator. The Ichimoku Cloud Strategy is a comprehensive trend-following system combining multiple indicators. It uses the Kumo (cloud) to identify support, resistance, and trend direction. Buy signals occur when price breaks above the cloud with bullish confirmation. Sell signals trigger when price breaks below with bearish alignment. Ideal for spotting momentum shifts and sustained trend entries.
Candle Eraser (New York Time, Dropdown)If you want to focus on first 3 hours of Asia, London> and New York, inspired by Stacey Burke Trading 12 Candle Window Concept
- Set your time to UTC-4 New York