PROTECTED SOURCE SCRIPT
Diupdate RTH Previous Day's Range + SMTs [bilal x shpat]

Overview
This advanced indicator is designed specifically for futures and equity traders who focus on Regular Trading Hours (RTH) sessions. It automatically plots the previous RTH session's high and low levels and detects Smart Money Theory (SMT) divergences across multiple correlated or inversely correlated instruments.
Key Features
Automatically identifies and tracks Regular Trading Hours (9:30 AM - 4:14 PM New York time)
Plots horizontal lines at the previous RTH session's high and low
Works seamlessly on all timeframes, including ETH (Extended Trading Hours) charts
Lines dynamically extend and update as new bars form
Compares up to 3 correlated or inversely correlated assets simultaneously
Detects bullish and bearish SMT divergences automatically
Visual divergence lines connect previous session levels to current intraday highs/lows
Customizable SMT labels showing which instruments are diverging
Option to mark assets as "Correlated" or "Inversely Correlated" for accurate divergence detection
SMT detection occurs only during RTH sessions for cleaner signals
3 Label Styles: Choose between "Full" (RTH Previous Day High), "Short" (RTH PDH), or "Lowercase" (rth previous day high)
Adjustable Label Sizes: Tiny, Small, Normal, or Large
Custom Colors: Separate color controls for lines, labels, bullish SMT, and bearish SMT
Line Extension: Control how many bars ahead lines extend
Line Width: Customize line thickness
Arrow Symbols: ▲ = Higher / ▼ = Lower (for correlated assets)
Alternate Symbols: 🔺 = Higher / 🔻 = Lower (for inversely correlated assets)
Color-coded divergence lines (white by default, fully customizable)
Optional SMT labels showing ticker symbols with directional indicators
Optional comparison table displaying current divergence status
Add up to 2 comparison symbols (e.g., ES1!, YM1!, NQ1!)
Toggle each comparison asset on/off independently
Set correlation type (Correlated or Inversely Correlated) for each asset
Popular comparisons: ES vs NQ, YM vs ES, Equity vs Futures
Option to delete previous RTH SMTs when new session starts
Automatic cleanup of outdated lines and labels
Transparent label backgrounds for minimal chart clutter
Lines track exact bar where high/low occurred
How It Works
Session Detection: The indicator identifies when RTH begins (9:30 AM ET) and tracks all price action during the session until close (4:14 PM ET)
Level Capture: At the start of each new RTH session, it captures the previous session's high and low and plots them as reference levels
SMT Analysis: During the current RTH session, it continuously compares the current session's high/low with the previous session's high/low across all selected instruments
Divergence Identification: When one instrument makes a higher high while another makes a lower high (or vice versa), an SMT divergence is detected and visualized
Use Cases
Liquidity Analysis: Identify when markets are taking liquidity at different rates
Reversal Signals: SMT divergences often precede significant reversals
Correlation Trading: Monitor when traditionally correlated markets begin to diverge
Key Level Trading: Use previous RTH high/low as support/resistance levels
Multi-Market Analysis: Compare ES, NQ, and YM simultaneously for institutional flow
Best Practices
Most effective on intraday timeframes (1m - 15m charts)
Works on both RTH and ETH chart sessions - meant to be used on a RTH chart
Compare highly correlated instruments (e.g., ES1! vs NQ1!)
Use in combination with volume analysis and market structure
SMT divergences are most powerful near key levels
Settings Overview
Comparison Symbols
Asset 2 & 3: Select tickers to compare (e.g., ES1!, YM1!)
Correlation toggles for each asset
Enable/disable each comparison independently
Styling
Line color, width, and extension length
Label color, size, and style (3 options)
Separate colors for bullish and bearish SMT lines
SMT Controls
Toggle SMT detection on/off
Show/hide SMT text labels
Optional SMT comparison table
Delete previous session SMTs option
Note: This indicator is best used by traders familiar with Smart Money Concepts (SMC) and inter-market analysis. Understanding market correlations is essential for accurate interpretation of SMT divergences.
This advanced indicator is designed specifically for futures and equity traders who focus on Regular Trading Hours (RTH) sessions. It automatically plots the previous RTH session's high and low levels and detects Smart Money Theory (SMT) divergences across multiple correlated or inversely correlated instruments.
Key Features
- 📊 RTH Range Detection
Automatically identifies and tracks Regular Trading Hours (9:30 AM - 4:14 PM New York time)
Plots horizontal lines at the previous RTH session's high and low
Works seamlessly on all timeframes, including ETH (Extended Trading Hours) charts
Lines dynamically extend and update as new bars form
- 🔄 Smart Money Theory (SMT) Divergence Detection
Compares up to 3 correlated or inversely correlated assets simultaneously
Detects bullish and bearish SMT divergences automatically
Visual divergence lines connect previous session levels to current intraday highs/lows
Customizable SMT labels showing which instruments are diverging
Option to mark assets as "Correlated" or "Inversely Correlated" for accurate divergence detection
SMT detection occurs only during RTH sessions for cleaner signals
- 🎨 Fully Customizable Styling
3 Label Styles: Choose between "Full" (RTH Previous Day High), "Short" (RTH PDH), or "Lowercase" (rth previous day high)
Adjustable Label Sizes: Tiny, Small, Normal, or Large
Custom Colors: Separate color controls for lines, labels, bullish SMT, and bearish SMT
Line Extension: Control how many bars ahead lines extend
Line Width: Customize line thickness
- 📈 SMT Visual Indicators
Arrow Symbols: ▲ = Higher / ▼ = Lower (for correlated assets)
Alternate Symbols: 🔺 = Higher / 🔻 = Lower (for inversely correlated assets)
Color-coded divergence lines (white by default, fully customizable)
Optional SMT labels showing ticker symbols with directional indicators
Optional comparison table displaying current divergence status
- ⚙️ Comparison Settings
Add up to 2 comparison symbols (e.g., ES1!, YM1!, NQ1!)
Toggle each comparison asset on/off independently
Set correlation type (Correlated or Inversely Correlated) for each asset
Popular comparisons: ES vs NQ, YM vs ES, Equity vs Futures
- 🧹 Clean Chart Management
Option to delete previous RTH SMTs when new session starts
Automatic cleanup of outdated lines and labels
Transparent label backgrounds for minimal chart clutter
Lines track exact bar where high/low occurred
How It Works
Session Detection: The indicator identifies when RTH begins (9:30 AM ET) and tracks all price action during the session until close (4:14 PM ET)
Level Capture: At the start of each new RTH session, it captures the previous session's high and low and plots them as reference levels
SMT Analysis: During the current RTH session, it continuously compares the current session's high/low with the previous session's high/low across all selected instruments
Divergence Identification: When one instrument makes a higher high while another makes a lower high (or vice versa), an SMT divergence is detected and visualized
Use Cases
Liquidity Analysis: Identify when markets are taking liquidity at different rates
Reversal Signals: SMT divergences often precede significant reversals
Correlation Trading: Monitor when traditionally correlated markets begin to diverge
Key Level Trading: Use previous RTH high/low as support/resistance levels
Multi-Market Analysis: Compare ES, NQ, and YM simultaneously for institutional flow
Best Practices
Most effective on intraday timeframes (1m - 15m charts)
Works on both RTH and ETH chart sessions - meant to be used on a RTH chart
Compare highly correlated instruments (e.g., ES1! vs NQ1!)
Use in combination with volume analysis and market structure
SMT divergences are most powerful near key levels
Settings Overview
Comparison Symbols
Asset 2 & 3: Select tickers to compare (e.g., ES1!, YM1!)
Correlation toggles for each asset
Enable/disable each comparison independently
Styling
Line color, width, and extension length
Label color, size, and style (3 options)
Separate colors for bullish and bearish SMT lines
SMT Controls
Toggle SMT detection on/off
Show/hide SMT text labels
Optional SMT comparison table
Delete previous session SMTs option
Note: This indicator is best used by traders familiar with Smart Money Concepts (SMC) and inter-market analysis. Understanding market correlations is essential for accurate interpretation of SMT divergences.
thank you shpat for the SMT option in the last indicator, i tweaked it for this one
Catatan Rilis
+ option to only show the range during RTH - hidden during ETHSkrip terproteksi
Skrip ini diterbitkan sebagai sumber tertutup. Namun, anda dapat menggunakannya secara bebas dan tanpa batasan apa pun – pelajari lebih lanjut di sini.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.
Skrip terproteksi
Skrip ini diterbitkan sebagai sumber tertutup. Namun, anda dapat menggunakannya secara bebas dan tanpa batasan apa pun – pelajari lebih lanjut di sini.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.