OPEN-SOURCE SCRIPT
Advanced Breakout System v2.0

Advanced Breakout System v2.0
Developed by: Mohammed Bedaiwi
This script hunts for high-probability breakouts by combining price consolidation zones, volume spikes vs. average volume, smart money flow (OBV), and a Momentum Override for explosive moves that skip consolidation. Additionally, it automatically identifies and plots Support and Resistance levels with price labels to help you visualize market structure.
The system follows a "Watch & Confirm" logic: it first prints a WATCH setup, then a BUY only if price confirms strength.
💡 JUSTIFICATION OF CONCEPTS (MASHUP & ORIGINALITY)
This script is an original mashup combining several analytical concepts to address common breakout failures:
✅ STRATEGY RESULTS & POLICY COMPLIANCE
To ensure non-misleading and transparent backtesting results, this strategy is published with the following fully compliant properties:
⚙️ VISUAL GUIDE & SIGNAL LOGIC
Key Color Legend (Visual Guide):
⌨️ INPUTS (DEFAULT SETTINGS)
⚠️ Disclaimer Trading involves significant risk of loss. This script is for educational and informational purposes only and is not financial advice or a recommendation to buy or sell any asset. BUY and SELL signals are rule-based and derived from historical behavior and do not guarantee future performance. Always use your own analysis and risk management. This is an open-source strategy; users are encouraged to test it across different symbols and timeframes.
Developed by: Mohammed Bedaiwi
This script hunts for high-probability breakouts by combining price consolidation zones, volume spikes vs. average volume, smart money flow (OBV), and a Momentum Override for explosive moves that skip consolidation. Additionally, it automatically identifies and plots Support and Resistance levels with price labels to help you visualize market structure.
The system follows a "Watch & Confirm" logic: it first prints a WATCH setup, then a BUY only if price confirms strength.
💡 JUSTIFICATION OF CONCEPTS (MASHUP & ORIGINALITY)
This script is an original mashup combining several analytical concepts to address common breakout failures:
- Volatility Compression Engine: Uses built-in functions like ta.highest() and ta.lowest() to mathematically define the setup phase where price volatility is compressed below a user-defined threshold.
- Volume Spike Confirmation: The breakout must be confirmed by a volume increase greater than a moving average of volume, signaling strong market interest.
- Smart Volume Filter (OBV): This is the key component. By checking if ta.obv is above its own Moving Average, we confirm that accumulation has been occurring during the consolidation period, suggesting institutional positioning before the price break.
- Multi-Exit Risk System: Employs dynamic exits (EMA cross, volume dump, bearish pattern) instead of static stop-losses to manage risk adaptively based on real-time market action.
- Market Structure Visualization: The script also includes a Support & Resistance engine to plot key swing pivots and price labels for visual context.
✅ STRATEGY RESULTS & POLICY COMPLIANCE
To ensure non-misleading and transparent backtesting results, this strategy is published with the following fully compliant properties:
- Dataset Compliance: The backtest is performed on the CMTL Daily (1D) chart across a long history, generating 201 total trades. This significantly exceeds the minimum requirement of 100 trades, providing a robust test dataset.
- Risk Control: The strategy uses a conservative order size set to 2% of equity (default_qty_value=2), strictly adhering to the sustainable risk recommendation of 5-10% of equity per trade.
- Transaction Costs: Realistic trading conditions are modeled using 0.07% commission and 3 ticks slippage to prevent the overestimation of profitability.
⚙️ VISUAL GUIDE & SIGNAL LOGIC
Key Color Legend (Visual Guide):
- WATCH – Setup (Yellow Arrow Down): Potential breakout setup detected.
- BUY – Confirmation (Green Arrow Up): Confirmed breakout, triggered when price trades above the high of the WATCH candle.
- SELL – Break (Orange Arrow): Short-term trend weakness, triggered when price closes below the Fast EMA (9).
- SELL – Dump (Dark Red Arrow): Distribution / volume dump, triggered by a bearish candle with abnormally high volume.
- SELL – Pattern (Purple Arrow): Bearish price-action pattern (such as a bearish engulfing).
- Support & Resistance Lines (Red/Green): Small horizontal lines plotted at key swing points with exact price labels.
⌨️ INPUTS (DEFAULT SETTINGS)
- Entry settings: Consolidation Lookback (default 20) = bars used to detect consolidation. Consolidation Range % (default 12%) = max allowed range size. Volume Spike Multiplier (default 1.2) = factor above average volume to count as a spike. Force Signal on Big Moves (default ON) = forces a WATCH signal on high-momentum moves.
- Exit settings: Enable Fast Exit (EMA 9) toggles the SELL – Break signal. Dump Volume Multiplier defines what counts as “dump” volume.
- Support & Resistance: Adjustable Pivot Left/Right bars control the sensitivity of the support and resistance lines.
⚠️ Disclaimer Trading involves significant risk of loss. This script is for educational and informational purposes only and is not financial advice or a recommendation to buy or sell any asset. BUY and SELL signals are rule-based and derived from historical behavior and do not guarantee future performance. Always use your own analysis and risk management. This is an open-source strategy; users are encouraged to test it across different symbols and timeframes.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.