ORB Advanced Cloud Indicator & FIB's by TenAMTraderSummary: ORB Advanced Cloud Indicator with Alerts and Fibonacci Retracement Targets by TenAMTrader
This TradingView script is an advanced version of the Opening Range Breakout (ORB) indicator, enhanced with visual clouds and Fibonacci retracement/extension levels. It is designed to help traders identify key price levels and track price movements relative to those levels throughout the trading day. The script includes alert functionalities to notify traders when price crosses key levels and when Fibonacci levels are reached, which can serve as potential entry and exit targets.
Key Features:
Primary and Secondary Range Calculation:
The indicator calculates the primary range (defined by a start and end time) and optionally, a secondary range.
The primary range includes the highest and lowest prices during the designated time period, as well as the midpoint of this range.
The secondary range (if enabled) tracks another price range during a second time period, with its own high, low, and midpoint.
Visual Clouds:
The script draws colored clouds between the high, midpoint, and low of the opening range.
The upper cloud spans between the Opening High and Midpoint, while the lower cloud spans between the Midpoint and Opening Low.
Similarly, a second set of clouds can be drawn for the secondary range (if enabled).
Fibonacci Levels:
The script calculates Fibonacci retracement and extension levels based on the primary range (the difference between the Opening High and Opening Low).
Fibonacci levels can be used as entry and exit targets in a trading strategy, as these levels often act as potential support/resistance zones.
Fibonacci levels include standard values like -0.236, -0.382, -0.618, and positive extensions like 1.236, 1.618, etc.
Customizable Alerts:
Alerts can be set to trigger when:
The price crosses above the Opening High.
The price crosses below the Opening Low.
The price crosses the Opening Midpoint.
These alerts can help traders act quickly on important price movements relative to the opening range.
Customization Options:
The indicator allows users to adjust the time settings for both the primary and secondary ranges.
Custom colors can be set for the lines, clouds, and Fibonacci levels.
The visibility of each line and cloud can be toggled on or off, giving users flexibility in how the chart is displayed.
Fibonacci Levels Overview:
The script includes several Fibonacci retracement and extension levels:
Negative Retracements (e.g., -0.236, -0.382, -0.50, -0.618, etc.) are plotted below the Opening Low, and can act as potential support levels in a downtrend.
Positive Extensions (e.g., 1.236, 1.382, 1.618, 2.0, etc.) are plotted above the Opening High, and can act as potential resistance levels in an uptrend.
Fib levels can be used as entry and exit targets to capitalize on price reversals or breakouts.
Safety Warning:
This script is for educational and informational purposes only and is not intended as financial advice. While it provides valuable technical information about price ranges and Fibonacci levels, trading always involves risk. Users are encouraged to:
Paper trade or use a demo account before applying this indicator with real capital.
Use proper risk management strategies, including stop-loss orders, to protect against unexpected market movements.
Understand that no trading strategy, indicator, or tool can guarantee profits, and losses can occur.
Important: The creator, TenAMTrader, and TradingView are not responsible for any financial losses resulting from the use of this script. Always trade responsibly, and ensure you fully understand the risks involved in any trading strategy.
Pivot noktaları ve seviyeleri
Buy/Sell Signal Indicatorrength Calculation: The script checks how often the price has interacted with each support or resistance level within a certain look-back period (loopback). The more interactions, the stronger the support or resistance is considered.
Opening Range Breakout Cloud Indicator by TenAMTraderOpening Range Breakout Cloud Indicator – by TenAMTrader
This indicator visually maps out the Opening Range of the trading day — the price high and low between a configurable start and end time (default: 9:30 AM–10:00 AM EST). It helps traders identify breakout levels, key intraday zones, and price behavior relative to the early range.
🔹 What It Shows:
Opening High, Low, and Midpoint lines for each day.
Clouds between the midpoint and high/low for visual clarity.
Optional Second Range (e.g., 9:30–9:45 AM) for more aggressive early signals.
Historical Ranges are preserved, allowing you to view previous days' levels on the chart.
Custom Alerts when price crosses the Opening High, Low, or Midpoint.
Full customization: colors, range times, and display toggles.
🔔 Use It For:
Spotting breakouts or rejections at key levels.
Finding early support/resistance zones.
Planning trades using intraday structure.
⚠️ Use this tool as part of a broader trading strategy. No indicator guarantees results — always trade at your own discretion.
TradeNeon - Level of InterestLevel of Interest (LOI) is part of the TradeNeon Software Portfolio – built for professional futures traders.
LOI highlights key price zones of institutional interest based on proprietary models and displays them directly on your chart.
It helps you cut through market noise, improve timing, and focus on what truly matters: structure, context, and key decision points.
Use LOI to navigate markets with clarity and confidence.
Level of Interest – See what matters.
Use the daily, professional market analyses to your advantage. Our experts with years of experience identify precise price areas of institutional interest. Maximize your trading potential and use these high-quality trading locations for your individual strategies.
tradeneon-academy.com/level-of-interest/
Daily ATR Bonanza: Expected Moves - Tr33man Daily ATR Bonanza: Expected Moves
Overview 🤷♂️
The Daily ATR Bonanza script is a powerful trading tool designed to help traders visualize and understand potential price movements using the Average True Range (ATR). It provides daily and weekly ATR levels, historical statistics, and conditional probability analysis to give traders actionable insights. The script also plots the daily Keltner channel. This script is ideal for traders who want to gauge volatility, identify key levels, and make data-driven decisions.
b]Key Features:
📈 1. Daily and Weekly ATR Levels
🔵ATR Levels: The script calculates and displays ATR-based levels for the day and week. These levels are derived from the previous day's or week's close price and are adjusted using customizable multipliers (0.5x, 1x, and 1.5x by default).
🔵You can choose the number of ATR levels (1, 2, or 3) and adjust the multipliers to suit your trading strategy.
🌐 2. ATR Bands (Keltner Channels)
🔵The script includes an option to display ATR Bands, which are volatility-based envelopes around a moving average. These bands help identify overbought and oversold conditions.
🔵You can adjust the ATR multiplier and the length of the moving average used for the bands.
🧮 3. Historical Statistics and Conditional Probability
🔵 Historical Analysis: The script analyzes historical price movements to calculate the likelihood of closing at certain ATR levels.
🔵 Conditional Probability: This feature shows the probability of the price reaching specific ATR levels given the current market conditions. The conditional matches historical data by an open in the same opening ATR bucket, as well as the current price bucket having been visited in the historical case. Conditional probabilities are just statistics, and do not predict anything.
Data Table: 📚
🔵 Historical Close Probability: The percentage of days the price closed within each ATR level.
🔵 Conditional Close Probability: The likelihood of the price closing within each ATR level today.
❓ What is Conditional Probability? ❓
Conditional probability is a statistical measure that calculates the likelihood of an event occurring given that another event has already occurred. In this script, it is used to determine the probability of the price reaching specific ATR levels based on the current opening range as well as current ATR distance from the previous close.
For example:
If the market opens near the lower end of the first ATR level, the script calculates the likelihood of the price reaching the upper end of the first, second, or third ATR level.
This analysis is based on historical data, making it a powerful tool for understanding potential price movements.
🌟 Understanding the Levels
🔵Daily Levels: These are based on the previous day's close price and ATR. They are updated at the start of each new day.
🔵Weekly Levels: These are based on the previous week's close price and ATR. They are updated at the start of each new week.
🔵ATR Bands: These are dynamic levels that adjust with market volatility.
🔬 Analyze the Statistics (Daily only for now, no weekly yet)
🔵Use the interactive table to understand historical probabilities and conditional probabilities.
🔵Focus on the current opening range and the likelihood of reaching specific levels.
🧠 Make Trading Decisions
🔵Use the ATR levels and bands to identify key support and resistance levels.
🔵Use the conditional probability table to gauge the likelihood of reaching specific targets.
🔵Adjust your strategy based on the historical performance of the market.
Example Use Cases
1. Day Trading
Use the daily ATR levels to set intraday targets and stop-loss levels.
Monitor the conditional probability table to adjust your expectations based on the opening range.
2. Swing Trading
Use the weekly ATR levels to identify longer-term support and resistance levels.
3. Scalping
Use the ATR bands to identify overbought and oversold conditions.
Use the conditional probability table to quickly assess the likelihood of price movements.
Pre-Market and TargetsPre Market and Yesterday high lows, you can take judgement on based of these levels, if price is above pre market high and yesterday high then just go for long trades and vice versa
ICT Killzones & PivotsPivots and Killzones Indicator
Introduction
The Pivots and Killzones Indicator is a valuable tool for traders utilizing the Inner Circle Trader approach. By incorporating ICT killzones and pivot points, this indicator provides insights into potential market turning points, helping traders make informed decisions.
Whether you are new to trading or an experienced ICT trader, this indicator can improve your understanding of market dynamics and support your trading strategy.
Features
ICT Killzones: The indicator highlights Inner Circle Trader's killzones, specific timeframes known for increased market liquidity, which are crucial for identifying potential reversals and turning points.
Pivot Points: The indicator displays pivot points, which are essential support and resistance levels derived from historical price data. These levels assist in gauging potential price reversals and trend changes.
Customization: Customize the indicator settings to match your trading style. Adjust colors, timeframes, and other parameters to align with your preferences.
User-Friendly Interface: Designed with a clean and user-friendly interface, this indicator is accessible to traders of all skill levels.
Real-Time Updates: The indicator offers real-time updates, ensuring you have the most current market information at your fingertips.
github.com
Volume-Weighted Pivot BandsThe Volume-Weighted Pivot Bands are meant to be a dynamic, rolling pivot system designed to provide traders with responsive support and resistance levels that adapt to both price volatility and volume participation. Unlike traditional daily pivot levels, this tool recalculates levels bar-by-bar using a rolling window of volume-weighted averages, making it highly relevant for intraday traders, scalpers, swing traders, and algorithmic systems alike.
-- What This Indicator Does --
This tool calculates a rolling VWAP-based pivot level, and surrounds that central pivot with up to five upper bands (R1–R5) and five lower bands (S1–S5). These act as dynamic zones of potential resistance (R) and support (S), adapting in real time to price and volume changes.
Rather than relying on static session or daily data, this indicator provides continually evolving levels, offering more relevant levels during sideways action, trending periods, and breakout conditions.
-- How the Bands Are Calculated --
Pivot (VWAP Pivot):
The core of this system is a rolling Volume-Weighted Average Price, calculated over a user-defined window (default 20 bars). This ensures that each bar’s price impact is weighted by its volume, giving a more accurate view of fair value during the selected lookback.
Volume-Weighted Range (VW Range):
The highest high and lowest low over the same window are used to calculate the volatility range — this acts as a spread factor.
Support & Resistance Bands (S1–S5, R1–R5):
The bands are offset above and below the pivot using multiples of the VW Range:
R1 = Pivot + (VW Range × multiplier)
R2 = R1 + (VW Range × multiplier)
R3 = R2 + (VW Range x multiplier)
...
S1 = Pivot − (VW Range × multiplier)
S2 = S1 − (VW Range × multiplier)
S3 = S2 - (VW Range x multiplier)
...
You can control the multiplier manually (default is 0.25), to widen or tighten band spacing.
Smoothing (Optional):
To prevent erratic movements, you can optionally toggle on/off a simple moving average to the pivot line (default length = 20), providing a smoother trend base for the bands.
-- How to Use It --
This indicator can be used for:
Support and resistance identification:
Price often reacts to R1/S1, and the outer bands (R4/R5 or S4/S5) act as overshoot zones or strong reversal areas.
Trend context:
If price is respecting upper bands (R2–R3), the trend is likely bullish. If price is pressing into S3 or lower, it may indicate sustained selling pressure or a breakdown.
Volatility framing:
The distance between bands adjusts based on price range over the rolling window. In tighter markets, the bands compress — in volatile moves, they expand. This makes the indicator self-adaptive.
Mean reversion trades:
A move into R4/R5 or S4/S5 without continuation can be a sign of exhaustion — potential for reversal toward the pivot.
Alerting:
Built-in alerts are available for crosses of all major bands (R1–R5, S1–S5), enabling trade automation or scalp alerts with ease.
-- Visual Features --
Fuchsia Lines: Mark all Resistance (R1–R5) levels.
Lime Lines: Mark all Support (S1–S5) levels.
Gray Circle Line: Marks the rolling pivot (VWAP-based).
-- Customizable Settings --
Rolling Length: Number of bars used to calculate VWAP and VW Range.
Multiplier: Controls how wide the bands are spaced.
Smooth Pivot: Toggle on/off to smooth the central pivot.
Pivot Smoothing Length: Controls how many bars to average when smoothing is enabled.
Offset: Visually shift all bands forward/backward in time.
-- Why Use This Over Standard Pivots? --
Traditional pivots are based on previous session data and remain fixed. That’s useful for static setups, but may become irrelevant as price action evolves. In contrast:
This system updates every bar, adjusting to current price behavior.
It includes volume — a key feature missing from most static pivots.
It shows multiple bands, giving a full view of compression, breakout potential, or trend exhaustion.
-- Who Is This For? --
This tool is ideal for:
Day traders & scalpers who need relevant intraday levels.
Swing traders looking for evolving areas of confluence.
Algorithmic/systematic traders who rely on quantifiable, volume-aware support/resistance.
Traders on all assets: works on crypto, stocks, futures, forex — any chart that has volume.
Small Cap Momentum Entry System✅ Features Included:
Momentum entry detection
Trailing stop overlay
Alert for entry and exit
Pre-market high line (optional display toggle)
1-Candle Order Block DetectorThis simple indicator is based on the 1-Candle rule. During an impulsive move toward the upside or downside, an order block is plotted based on a single down-closed or up-closed candle.
Inputs can be easily customized based on preferences or strength of trend filtering.
Major Session Highs/LowsThis indicator creates horizontal lines at major session high/lows (US, London, and Asian). The script updates the lines automatically, on session close.
For instance, when viewing during the US session, after the London overlap, horizontal lines will be displayed at the following levels.
The high/low of the most recent London session.
The high/low of the most recent Asian session.
The high/low of the last full US session, i.e. the session of the day prior.
When the current US session closes, the US levels automatically update.
3 Candle Rules -PJThis script is to identify the change in trend by simply applying 3 rules on candle sticks. These three rules are applied by comparing HLC of current candle with previous candle.
RM Market StructureThis indicator helps you identify market structure by plotting swing highs and lows (HH, LH, HL, LL), and BOS/CHOCH. 4 swing lengths can be plotted on the chart.
KeyLevelsPivotsIndicator Name: Key Levels with Pivots
This indicator identifies key support and resistance levels using pivot high and pivot low values derived from TradingView’s built-in functions (ta.pivothigh and ta.pivotlow). When a new pivot is detected, the indicator checks if a similar level—within a specified percentage threshold (for example, ±1%) of the pivot value—already exists. If no such level is present, a horizontal line is drawn at that pivot level.
The drawn level extends to the right, automatically updating until one of two conditions occurs:
A breakout takes place—defined as the price moving beyond the level by the specified percentage—and then the level is fixed (truncated) at the bar where the breakout occurred.
The level reaches a maximum age (expressed in bars, e.g., 750 bars for a daily timeframe which approximates 3 years). In this case, the level is fixed at that maximum age.
Once fixed, the level no longer updates, allowing traders to view historically significant support and resistance levels from today's date up to approximately three years back. Additionally, the indicator prevents the re-plotting of a level if a similar level already exists within the defined percentage threshold, thereby avoiding duplicate reflections of the same level unless a breakout occurs.
OpeningRange (Trading_Tix)Purpose:
The indicator highlights the high, low, and middle (50%) price levels of a specified session's opening range. These levels can serve as key support and resistance zones for trading strategies. The indicator also offers options to extend these levels beyond the session into later timeframes, making it useful for tracking breakout or trend continuation setups.
Key Features:
1. Session Detection:
The indicator identifies a specific session period using the user-defined Session Time. It calculates the start time, high, and low prices during this period:
rangeTime: Defines the session time range (default: 5:00 PM to 2:59 AM).
extendTime: Defines the extended time range where lines/backgrounds can be prolonged.
2. Opening Range Calculation:
High (high_val) and Low (low_val)**:
Tracks the highest and lowest prices during the session.
Middle Line:
A midpoint is calculated by averaging high_val and low_val.
3. Visual Elements:
Horizontal Lines:
Drawn at the high, low, and middle levels.
Customizable in width and color.
Shaded Background Box:
Covers the range between high and low prices.
The box’s color and transparency can be adjusted.
Line and Box Extension:
Optionally extends these elements into the extended time range.
4. Customization:
Users have the flexibility to:
Toggle visibility of lines, middle line, and background box.
Adjust colors, line thickness, and style.
Enable or disable the extension of lines and backgrounds into the extended period.
How It Works:
Initialization:
The script initializes variables to store range data (startTime, high_val, low_val) and drawing objects (lines, boxes).
It detects whether the current bar falls within the session (inSession) or extended timeframe (inExtend).
Plotting:
During the session:
Deletes previous lines and boxes from prior sessions.
Draws new lines at the high, low, and middle levels.
Creates a background box covering the range, if enabled.
During the extended period:
Extends the session lines and box, if the user has opted for extensions.
Updates:
Continuously adjusts the high/low values and updates the lines as new price data arrives.
Use Cases:
This indicator can be valuable for traders who:
Use the opening range to identify potential breakout zones.
Trade based on price consolidation within the range.
Want a visual representation of key price levels to plan entries and exits.
Would you like help refining this script further or adjusting its settings to match your trading style?
Liquidity Trap Reversal Pro (Radar v2)Liquidity Trap Reversal Pro (Radar v2) is a non-repainting indicator designed to detect hidden liquidity traps at key swing highs and lows. It combines wick analysis, volume spike detection, and optional trend and exhaustion filters to identify high-probability reversal setups.
🔷 Features:
Non-Repainting: Pivots confirmed after lookback period, no future leaking.
Volume Spike Detection: Filters traps that occur during major liquidity events.
EMA Trend Filter (Optional): Focus on traps aligned with the prevailing trend.
Higher Timeframe Trend Filter (Optional): Confirm traps using a higher timeframe EMA bias.
Exhaustion Guard (Optional): Prevents traps after overextended moves based on ATR stretch.
Clean Visuals: Distinct plots for raw trap points vs confirmed traps.
Alerts Included: Set alerts for confirmed high/low liquidity traps.
📚 How to Use:
Watch for Trap Signals:
A Trap High signal suggests a potential bearish reversal.
A Trap Low signal suggests a potential bullish reversal.
Use Confirmed Signals for Best Entries:
Confirmed traps fire only after price moves opposite to the trap direction, adding reliability.
Use Trend Filters to Improve Accuracy:
In an uptrend (price above EMA), prefer Trap Lows (buy setups).
In a downtrend (price below EMA), prefer Trap Highs (sell setups).
Use the Exhaustion Guard to Avoid Bad Trades:
This filter blocks signals when price has moved too far from trend, helping avoid late entries.
Recommended Settings:
Best used on 15-minute, 1-hour, or 4-hour charts.
Trend filter ON for trending markets.
Exhaustion guard ON for volatile or stretched markets.
📈 Important Notes:
This script does not repaint once a pivot is confirmed.
Alerts trigger only on confirmed trap signals.
Always combine signals with sound risk management and trading strategy.
Disclaimer:
This script is for educational purposes only. It is not investment advice or a guarantee of results. Always do your own research before trading.
RSI + MACD + Liquidity FinderLiquidity Finder: The liquidity zones are heuristic and based on volume and swing points. You may need to tweak the volumeThreshold and lookback to match the asset's volatility and timeframe.
Timeframe: This script works on any timeframe, but signals may vary in reliability (e.g., higher timeframes like 4H or 1D may reduce noise).
Customization: You can modify signal conditions (e.g., require only RSI or MACD) or add filters like trend direction using moving averages.
Backtesting: Use TradingView's strategy tester to evaluate performance by converting the indicator to a strategy (replace plotshape with strategy.entry/strategy.close).
SMC Entry Signals MTF v2📘 User Guide for the SMC Entry Signals MTF v2 Indicator
🎯 Purpose of the Indicator
This indicator is designed to identify reversal entry points based on Smart Money Concepts (SMC) and candlestick confirmation. It’s especially useful for traders who use:
Imbalance zones, order blocks, breaker blocks
Liquidity grabs
Multi-timeframe confirmation (MTF)
📈 How to Use the Signals on the Chart
✅ LONG Signal (green triangle below the candle):
Conditions:
Price is in a discount zone (below the FIB 50% level)
A bullish engulfing candle appears
A bullish Order Block (OB) or Breaker Block is detected
There’s an upward imbalance
A bullish OB is confirmed on the higher timeframe
➡️ How to act:
Consider entering long on the current or next candle.
Place your stop-loss below the OB or the nearest swing low.
Take profit at the nearest liquidity zone or premium area (above FIB 50%).
🔻 SHORT Signal (red triangle above the candle):
Conditions:
Price is in a premium zone (above FIB 50%)
A bearish engulfing candle appears
A bearish OB or Breaker Block is detected
There’s a downward imbalance
A bearish OB is confirmed on the higher timeframe
➡️ How to act:
Consider short entry after the signal.
Place your stop-loss above the OB or swing high.
Target the discount zone or the next liquidity pocket.
⚙️ Recommended Settings by Trading Style
Trading Style Suggested Settings Notes
Intraday (1–15m) fibLookback = 20–50, obLookback = 5–10, htf_tf = 1H/4H Fast signals. Use Discount/Premium + Engulfing.
Swing/Position (1H–1D) fibLookback = 50–100, obLookback = 10–20, htf_tf = 1D/1W Higher trust in MTF confirmation. Ideal with fundamentals.
Scalping (1m) fibLookback = 10–20, obLookback = 3–5, htf_tf = 15m/1H Remove Breaker and MTF for quick reaction trades.
🧠 Best Practices for Traders
Trend Filtering:
Use EMAs or volume to confirm the current trend.
Take longs only in uptrends, shorts in downtrends.
Liquidity Zones:
Use this indicator after liquidity grabs.
OBs and Breakers often appear right after stop hunts.
Combine with Manual Zones:
This works best when paired with manually drawn OBs and key levels.
Backtest the Signals:
Use Bar Replay mode on TradingView to test past signals.
🧪 Example Trade Setup
Example on BTCUSDT 15m:
Price drops into the discount zone.
A green triangle appears (bullish engulfing + OB + imbalance + HTF OB).
You enter long, stop below the OB, target the premium zone.
🎯 This type of setup often gives a risk/reward ratio of 1:2 or better — profitable even with a 40% win rate.
⏰ Alerts & Automation
Enable alerts:
"SMC Long Entry" — fires when a long signal appears.
"SMC Short Entry" — fires when a short signal appears.
You can integrate this with bots via webhook, like:
TradingConnector, 3Commas, Alertatron, etc.
✅ What This Indicator Gives You
High-probability entries using SMC logic
Customizable filters for entry logic
Multi-timeframe confirmation for stronger setups
Suitable for both intraday and swing trading
Custom Opening Range - CommoditiesThe Custom Opening Range Indicator for Commodities is designed for instruments that trade nearly 24 hours, such as crude oil or natural gas. It allows traders to define the Opening Range based on Indian Standard Time (IST)—typically starting at 3:30 AM IST, which aligns with the global commodities market open. Users can customize both the start time and duration of the range (e.g., 5, 15, or 30 minutes). The indicator dynamically plots the high and low of this range and shades the area between them, providing a clear visual reference for breakout or reversal setups during the rest of the trading session.
Anchored Darvas Box## ANCHORED DARVAS BOX
---
### OVERVIEW
**Anchored Darvas Box** lets you drop a single timestamp on your chart and build a Darvas-style consolidation zone forward from that exact candle. The indicator freezes the first user-defined number of bars to establish the range, verifies that price respects that range for another user-defined number of bars, then waits for the first decisive breakout. The resulting rectangle captures every tick of the accumulation phase and the exact moment of expansion—no manual drawing, complete timestamp precision.
---
### HISTORICAL BACKGROUND
Nicolas Darvas’s 1950s box theory tracked institutional accumulation by hand-drawing rectangles around tight price ranges. A trade was triggered only when price escaped the rectangle.
The anchored version preserves Darvas’s logic but pins the entire sequence to a user-chosen candle: perfect for analysing a market open, an earnings release, FOMC minute, or any other catalytic bar.
---
### ALGORITHM DETAIL
1. **ANCHOR BAR**
*You provide a timestamp via the settings panel.* The script waits until the chart reaches that bar and records its index as **startBar**.
2. **RANGE DEFINITION — BARS 1-7**
• `rangeHigh` = highest high of bars 1-7 plus optional tolerance.
• `rangeLow` = lowest low of bars 1-7 minus optional tolerance.
3. **RANGE VALIDATION — BARS 8-14**
• Price must stay inside ` `.
• Any violation aborts the test; no box is created.
4. **ARMED STATE**
• If bars 8-14 hold the range, two live guide-lines appear:
– **Green** at `rangeHigh`
– **Red** at `rangeLow`
• The script is now “armed,” waiting indefinitely for the first true breakout.
5. **BREAKOUT & BOX CREATION**
• **Up breakout** =`high > rangeHigh` → rectangle drawn in **green**.
• **Down breakout**=`low < rangeLow` → rectangle drawn in **red**.
• Box extends from **startBar** to the breakout bar and never updates again.
• Optional labels print the dollar and percentage height of the box at its left edge.
6. **OPTIONAL COOLDOWN**
• After the box is painted the script can stay silent for a user-defined number of bars, letting you study the fallout without another range immediately arming on top of it.
---
### INPUT PARAMETERS
• **ANCHOR TIME** – Precise yyyy-mm-dd HH:MM:SS that seeds the sequence.
• **BARS TO DEFINE RANGE** – Default 7; affects both definition and validation windows.
• **OPTIONAL TOLERANCE** – Absolute price buffer to ignore micro-wicks.
• **COOLDOWN BARS AFTER BREAKOUT** – Pause length before the indicator is allowed to re-anchor (set to zero to disable).
• **SHOW BOX DISTANCE LABELS** – Toggle to print Δ\$ and Δ% on every completed box.
---
### USER WORKFLOW
1. Add the indicator, open settings, and set **ANCHOR TIME** to the candle you care about (e.g., “2025-04-23 09:30:00” for NYSE open).
2. Watch live as the script:
– Paints the seven-bar range.
– Draws validation lines.
– Locks in the box on breakout.
3. Use the box boundaries as structural stops, targets, or context for further trades.
---
### PRACTICAL APPLICATIONS
• **OPENING RANGE BREAKOUTS** – Anchor at the first second of the session; capture the initial 7-bar range and trade the first clean break.
• **EVENT STUDIES** – Anchor at a news candle to measure immediate post-event volatility.
• **VOLUME PROFILE FUSION** – Combine the anchored box with VPVR to see if the breakout occurs at a high-volume node or a low-liquidity pocket.
• **RISK DISCIPLINE** – Stop-loss can sit just inside the opposite edge of the anchored range, enforcing objective risk.
---
### ADVANCED CUSTOMISATION IDEAS
• **MULTIPLE ANCHORS** – Clone the indicator and anchor several boxes (e.g., London open, New York open).
• **DYNAMIC WINDOW** – Switch the 7-bar fixed length to a volatility-scaled length (ATR percentile).
• **STRATEGY WRAPPER** – Turn the indicator into a `strategy{}` script and back-test anchored boxes on decades of data.
---
### FINAL THOUGHTS
Anchored Darvas Boxes give you Darvas’s timeless range-break methodology anchored to any candle of interest—perfect for dissecting openings, economic releases, or your own bespoke “important” bars with laboratory precision.
Auto Darvas Boxes## AUTO DARVAS BOXES
---
### OVERVIEW
**Auto Darvas Boxes** is a fully-automated, event-driven implementation of Nicolas Darvas’s 1950s box methodology.
The script tracks consolidation zones in real time, verifies that price truly “respects” those zones for a fixed validation window, then waits for the first decisive range violation to mark a directional breakout.
Every box is plotted end-to-end—from the first candle of the sideways range to the exact candle that ruptures it—giving you an on-chart, visually precise record of accumulation or distribution and the expansion that follows.
---
### HISTORICAL BACKGROUND
* Nicolas Darvas was a professional ballroom dancer who traded U.S. equities by telegram while touring the world.
* Without live news or Level II, he relied exclusively on **price** to infer institutional intent.
* His core insight: true market-moving entities leave footprints in the form of tight ranges; once their buying (or selling) is complete, price erupts out of the “box.”
* Darvas’s original procedure was manual—he kept notebooks, drew rectangles around highs and lows, and entered only when price punched out of the roof of a valid box.
* This indicator distills that logic into a rolling, self-resetting state machine so you never miss a box or breakout on any timeframe.
---
### ALGORITHM DETAIL (FOUR-STATE MACHINE)
**STATE 0 – RANGE DEFINITION**
• Examine the last *N* candles (default 7).
• Record `rangeHigh = highest(high, N) + tolerance`.
• Record `rangeLow = lowest(low, N) – tolerance`.
• Remember the index of the earliest bar in this window (`startBar`).
• Immediately transition to STATE 1.
**STATE 1 – RANGE VALIDATION**
• Observe the next *N* candles (again default 7).
• If **any** candle prints `high > rangeHigh` or `low < rangeLow`, the validation fails and the engine resets to STATE 0 **beginning at the violating candle**—no halfway boxes, no overlap.
• If all *N* candles remain inside the range, the box becomes **armed** and we transition to STATE 2.
**STATE 2 – ARMED (LIVE VISUAL FEEDBACK)**
• Draw a **green horizontal line** at `rangeHigh`.
• Draw a **red horizontal line** at `rangeLow`.
• Lines are extended in real time so the user can see the “live” Darvas ceiling and floor.
• Engine waits indefinitely for a breakout candle:
– **Up-Breakout** if `high > rangeHigh`.
– **Down-Breakout** if `low < rangeLow`.
**STATE 3 – BREAKOUT & COOLDOWN**
• Upon breakout the script:
1. Deletes the live range lines.
2. Draws a **filled rectangle (box)** from `startBar` to the breakout bar.
◦ **Green fill** when price exits above the ceiling.
◦ **Red fill** when price exits below the floor.
3. Optionally prints two labels at the left edge of the box:
◦ Dollar distance = `rangeHigh − rangeLow`.
◦ Percentage distance = `(rangeHigh − rangeLow) / rangeLow × 100 %`.
• After painting, the script waits a **user-defined cooldown** (default = 7 bars) before reverting to STATE 0. The cooldown guarantees separation between consecutive tests and prevents overlapping rectangles.
---
### INPUT PARAMETERS (ALL ADJUSTABLE FROM THE SETTINGS PANEL)
* **BARS TO DEFINE RANGE** – Number of candles used for both the definition and validation windows. Classic Darvas logic uses 7 but feel free to raise it on higher timeframes or volatile instruments.
* **OPTIONAL TOLERANCE** – Absolute price buffer added above the ceiling and below the floor. Use a small tolerance to ignore single-tick spikes or data-feed noise.
* **COOLDOWN BARS AFTER BREAKOUT** – How long the engine pauses before hunting for the next consolidation. Setting this equal to the range length produces non-overlapping, evenly spaced boxes.
* **SHOW BOX DISTANCE LABELS** – Toggle on/off. When on, each completed box displays its vertical size in both dollars and percentage, anchored at the box’s left edge.
---
### REAL-TIME VISUALISATION
* During the **armed** phase you see two extended, colour-coded guide-lines showing the exact high/low that must hold.
* When the breakout finally occurs, those lines vanish and the rectangle instantly appears, coloured to match the breakout direction.
* This immediate visual feedback turns any chart into a live Darvas tape—no manual drawing, no lag.
---
### PRACTICAL USE-CASES & BEST-PRACTICE WORKFLOWS
* **INTRADAY MOMENTUM** – Drop the script on 1- to 15-minute charts to catch tight coils before they explode. The coloured box marks the precise origin of the expansion; stops can sit just inside the opposite side of the box.
* **SWING & POSITION TRADING** – On 4-hour or daily charts, boxes often correspond to accumulation bases or volatility squeezes. Waiting for the box-validated breakout filters many false signals.
* **MEAN-REVERSION OR “FADE” STRATEGIES** – If a breakout immediately fails and price re-enters the box, you may have trapped momentum traders; fading that failure can be lucrative.
* **RISK MANAGEMENT** – Box extremes provide objective, structure-based stop levels rather than arbitrary ATR multiples.
* **BACK-TEST RESEARCH** – Because each box is plotted from first range candle to breakout candle, you can programmatically measure hold time, range height, and post-breakout expectancy for any asset.
---
### CUSTOMISATION IDEAS FOR POWER USERS
* **VOLATILITY-ADAPTIVE WINDOW** – Replace the fixed 7-bar length with a dynamic value tied to ATR percentile so the consolidation window stretches or compresses with volatility.
* **MULTI-TIMEFRAME LOGIC** – Only arm a 5-minute box if the 1-hour trend is aligned.
* **STRATEGY WRAPPER** – Convert the indicator to a full `strategy{}` script, automate entries on breakouts, and benchmark performance across assets.
* **ALERTS** – Create TradingView alerts on both up-breakout and down-breakout conditions; route them to webhook for broker automation.
---
### FINAL THOUGHTS
**Auto Darvas Boxes** packages one of the market’s oldest yet still potent price-action frameworks into a modern, self-resetting indicator. Whether you trade equities, futures, crypto, or forex, the script highlights genuine contraction-expansion sequences—Darvas’s original “boxes”—with zero manual effort, letting you focus solely on execution and risk.