PROTECTED SOURCE SCRIPT

Previous Time Based Dealing Ranges [Pro +] | cephxs

868
Previous Time Based Dealing Ranges 🧪 [Pro +]
Visualize previous and current higher timeframe dealing ranges with dual-box OHLC representation, extending reference lines, and HTF candle displays.


OVERVIEW
This indicator displays time-based dealing ranges from higher timeframes directly on your chart. It shows the complete price action structure of previous (or current/forming) periods using a dual-box system: one box for the full High-Low range and another for the Open-Close body. Reference lines extend from key levels to help identify potential support, resistance, and mean reversion zones.

Perfect for traders who use ICT concepts, market structure analysis, or any methodology that relies on understanding where price has been relative to previous dealing ranges.

KEY FEATURES
  • Dual-Box Range Visualization: Each range displays two boxes - the full H-L range (outer) and the O-C body (inner) - giving immediate visual context of candle structure
  • Multiple Timeframes: Support for 4H, 6H, 1D, 1W, 1M, and 3M ranges
  • Previous/Current Mode: View completed ranges (Previous) or the forming range (Current) with real-time updates
  • Auto Mode: Automatically selects the appropriate range based on your chart timeframe
  • Reference Lines: Extending lines from High, Mid, Low (or Quadrants: H/75/M/25/L) with trade-into detection
  • HTF Candle Display: Visual HTF candles positioned to the right of price for context
  • 6H Session Support: Session-aware ranges for Asia, London, NY AM, and NY PM with labeled names
  • Open Line: Vertical line marking the range's opening price/time
  • Imbalance Detection: Fair Value Gaps and Volume Imbalances highlighted on HTF candles


MODE OPTIONS
  • Previous/Current: Previous shows the last completed range. Current shows the forming range with dynamic H/L/C updates
  • Auto/Manual: Auto selects range by chart TF. Manual lets you choose specific ranges
  • Extend Box (Current): In Current mode, extends the box's right edge as price develops


AUTO MODE TIMEFRAME LOGIC
  • Chart < 15m → 6H Range
  • Chart 15m-1H → 1D Range
  • Chart 1H-6H → 1W Range
  • Chart 6H-1D → 1M Range
  • Chart > 1D → 3M Range


INPUTS

Mode
  • Mode: Previous/Current - Choose completed or forming range
  • Auto/Manual: Auto selects range by chart TF, Manual lets you choose
  • Extend Box (Current): Extends box right edge with price (Current mode only)


Previous Ranges
  • Range 1: Enable/disable, select timeframe (4H/6H/1D/1W/1M/3M), max display count
  • Range 2: Second range layer for multi-timeframe analysis


Reference Lines
  • Line Mode: Levels (H/M/L) or Quadrants (H/75/M/25/L)
  • Line Style: Solid, dashed, or dotted
  • Line Thickness: 1-4 pixels
  • Show Labels: Toggle reference line labels
  • Label Offset: Distance of labels from current price (1-20 bars)
  • HTF Candle Levels: Show mini H/M/L lines on HTF candles
  • Open Line: Vertical line at range open with customizable style


Range Boxes & Colors
  • Show Range Boxes: Toggle box visibility (lines remain visible)
  • Per-Range Colors: Customize box and line colors for each timeframe (4H, 6H, 1D, 1W, 1M, 3M)


HTF Candle Styling
  • Show HTF Candles: Toggle HTF candle display
  • Body/Border/Wick Colors: Customize bull and bear candle appearance
  • Padding/Buffer/Width: Control candle spacing and size


Labels
  • HTF Label: Show timeframe label above/below candles
  • Remaining Time: Countdown timer to candle close
  • Label Position: Top, Bottom, or Both
  • Label Alignment: Align across timeframes or follow individual candles


Imbalance
  • Fair Value Gap: Highlight FVGs on HTF candles
  • Volume Imbalance: Highlight VIs on HTF candles


HOW TO USE
  1. Add the indicator to your chart
  2. Choose Previous or Current mode based on your analysis preference
  3. Use Auto mode for intelligent range selection, or Manual to select specific timeframes
  4. Reference lines extend from range levels - watch for price reactions at H/M/L
  5. In Current mode, observe how the range develops with real-time updates
  6. Use the HTF candles on the right for quick multi-timeframe context


REFERENCE LINE LABELS
Labels follow this format:
  • Previous mode: pD-H (previous Daily High), pW-M (previous Weekly Mid), p6H-London-L (previous 6H London Low)
  • Current mode: D-H (Daily High), W-M (Weekly Mid), 6H-Asia-L (6H Asia Low)


6H SESSION NAMES
  • Asia: 18:00-00:00 ET
  • London: 00:00-06:00 ET
  • NYAM: 06:00-12:00 ET
  • NYPM: 12:00-18:00 ET


RECOMMENDED TIMEFRAMES
  • 1-5 minute charts: 6H or 1D ranges
  • 15-60 minute charts: 1D or 1W ranges
  • 4H charts: 1W or 1M ranges
  • Daily charts: 1M or 3M ranges


Or simply use Auto mode to let the indicator choose the optimal range.

TIPS
  • The Mid (M) level often acts as equilibrium - watch for mean reversion plays
  • High and Low levels are more often than not, key to reversals
  • In Current mode, watch how price interacts with the forming range boundaries
  • Combine with your existing analysis for confluence


DISCLAIMER

This indicator is for educational and informational purposes only.
Past performance does not guarantee future results.
Always use proper risk management and never risk more than you can afford to lose.
Trading involves substantial risk of loss and is not suitable for all investors.


CREDITS
Original Base HTF candle Plotting Logic by fadizeidan. Put on Steroids by cephxs & fstarcapital.

CHANGELOG
  • Pro + v1.0: Added Previous/Current mode, 4H range, dual-box visualization, reference lines with trade-into detection, session-aware 6H labels, open line, Auto mode with intelligent TF selection

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.