OPEN-SOURCE SCRIPT
Breakout Confirmation

🔍 Indicator Name: Breakout Confirmation (Body + Volume)
📌 Purpose:
This indicator is designed to detect high-probability breakout setups based on price structure and volume strength. It identifies moments when the market breaks through a key support or resistance level, confirmed by two consecutive strong candles with large real bodies and high volume.
⚙️ How It Works
1. Support and Resistance Detection
The indicator uses pivot points to identify potential horizontal support and resistance levels.
A pivot high or pivot low is considered valid if it stands out over a configurable number of candles (default: 50).
Only the most recent valid support and resistance levels are tracked and displayed as horizontal lines on the chart.
2. Breakout Setup
The breakout condition is defined as:
First Candle (Breakout Candle):
Large body (compared to the recent body average)
High volume (compared to the recent volume average)
Must close beyond a resistance or support level:
Close above resistance (bullish breakout)
Close below support (bearish breakout)
Second Candle (Confirmation Candle):
Also must have a large body and high volume
Must continue in the direction of the breakout (i.e., higher close in bullish breakouts, lower close in bearish ones)
3. Signal Plotting
If both candles meet the criteria, the indicator plots:
A green triangle below the candle for bullish breakouts
A red triangle above the candle for bearish breakouts
📈 How to Interpret the Signals
✅ Green triangle below a candle:
Indicates a confirmed bullish breakout.
The price has closed above a recent resistance level with strength.
The trend may continue higher — possible entry for long positions.
🔻 Red triangle above a candle:
Indicates a confirmed bearish breakout.
The price has closed below a recent support level with strength.
Potential signal to enter short or exit long positions.
⚠️ The plotted horizontal lines show the last key support and resistance levels. These are the zones being monitored for breakouts.
📊 How to Use It
Timeframe: Works best on higher timeframes (1H, 4H, Daily), but can be tested on any chart.
Entry: Consider entries after the second candle confirms the breakout.
Stop Loss:
For longs: Below the breakout candle or the broken resistance
For shorts: Above the breakout candle or broken support
Take Profit:
Based on previous structure, risk:reward ratios, or using trailing stops.
Filter with Trend or Other Indicators (optional):
You can combine this with moving averages, RSI, or market structure for confluence.
🛠️ Customization Parameters
lengthSR: How many candles to look back for identifying support/resistance pivots.
volLength: Length of the moving average for volume and body size comparison.
bodyMultiplier: Multiplier threshold to define a “large” body.
volMultiplier: Multiplier threshold to define “high” volume.
✅ Ideal For:
Price action traders
Breakout traders
Traders who use volume analysis
Anyone looking to automate the detection of breakout + confirmation setups
📌 Purpose:
This indicator is designed to detect high-probability breakout setups based on price structure and volume strength. It identifies moments when the market breaks through a key support or resistance level, confirmed by two consecutive strong candles with large real bodies and high volume.
⚙️ How It Works
1. Support and Resistance Detection
The indicator uses pivot points to identify potential horizontal support and resistance levels.
A pivot high or pivot low is considered valid if it stands out over a configurable number of candles (default: 50).
Only the most recent valid support and resistance levels are tracked and displayed as horizontal lines on the chart.
2. Breakout Setup
The breakout condition is defined as:
First Candle (Breakout Candle):
Large body (compared to the recent body average)
High volume (compared to the recent volume average)
Must close beyond a resistance or support level:
Close above resistance (bullish breakout)
Close below support (bearish breakout)
Second Candle (Confirmation Candle):
Also must have a large body and high volume
Must continue in the direction of the breakout (i.e., higher close in bullish breakouts, lower close in bearish ones)
3. Signal Plotting
If both candles meet the criteria, the indicator plots:
A green triangle below the candle for bullish breakouts
A red triangle above the candle for bearish breakouts
📈 How to Interpret the Signals
✅ Green triangle below a candle:
Indicates a confirmed bullish breakout.
The price has closed above a recent resistance level with strength.
The trend may continue higher — possible entry for long positions.
🔻 Red triangle above a candle:
Indicates a confirmed bearish breakout.
The price has closed below a recent support level with strength.
Potential signal to enter short or exit long positions.
⚠️ The plotted horizontal lines show the last key support and resistance levels. These are the zones being monitored for breakouts.
📊 How to Use It
Timeframe: Works best on higher timeframes (1H, 4H, Daily), but can be tested on any chart.
Entry: Consider entries after the second candle confirms the breakout.
Stop Loss:
For longs: Below the breakout candle or the broken resistance
For shorts: Above the breakout candle or broken support
Take Profit:
Based on previous structure, risk:reward ratios, or using trailing stops.
Filter with Trend or Other Indicators (optional):
You can combine this with moving averages, RSI, or market structure for confluence.
🛠️ Customization Parameters
lengthSR: How many candles to look back for identifying support/resistance pivots.
volLength: Length of the moving average for volume and body size comparison.
bodyMultiplier: Multiplier threshold to define a “large” body.
volMultiplier: Multiplier threshold to define “high” volume.
✅ Ideal For:
Price action traders
Breakout traders
Traders who use volume analysis
Anyone looking to automate the detection of breakout + confirmation setups
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.