OPEN-SOURCE SCRIPT
Breakout + Retest Strategy

The Breakout + Retest Strategy is a proven price action approach used by professional traders to catch high-probability market moves after key levels are broken. This strategy aims to enter the market after confirmation — reducing false breakouts and improving entry accuracy.
🔍 Strategy Logic:
Identify a Key Support or Resistance Level
These could be recent swing highs/lows, consolidation zones, or session highs.
Wait for a Clean Breakout
Price must decisively break above resistance or below support with strong momentum.
Watch for the Retest
After the breakout, wait for the price to pull back to the broken level (now flipped support/resistance).
Enter on Retest Confirmation
Look for signs like rejection wicks, bullish/bearish engulfing candles, or strong volume on the retest.
Set Risk-Managed Stops and Targets
Stop loss goes below (for long) or above (for short) the retested level.
Target is usually set at a 1:2 or higher risk-to-reward ratio, or based on structure.
✅ Why It Works:
Filters out fake breakouts
Uses market structure and liquidity traps to your advantage
Combines both momentum and confirmation
⚙️ Best Timeframes:
15-minute to 1-hour for intraday setups
4-hour and daily for swing trades
📊 Ideal for:
Futures (NQ, ES, Gold)
Forex pairs
Crypto
Stocks near key earnings or breakout zones
🔍 Strategy Logic:
Identify a Key Support or Resistance Level
These could be recent swing highs/lows, consolidation zones, or session highs.
Wait for a Clean Breakout
Price must decisively break above resistance or below support with strong momentum.
Watch for the Retest
After the breakout, wait for the price to pull back to the broken level (now flipped support/resistance).
Enter on Retest Confirmation
Look for signs like rejection wicks, bullish/bearish engulfing candles, or strong volume on the retest.
Set Risk-Managed Stops and Targets
Stop loss goes below (for long) or above (for short) the retested level.
Target is usually set at a 1:2 or higher risk-to-reward ratio, or based on structure.
✅ Why It Works:
Filters out fake breakouts
Uses market structure and liquidity traps to your advantage
Combines both momentum and confirmation
⚙️ Best Timeframes:
15-minute to 1-hour for intraday setups
4-hour and daily for swing trades
📊 Ideal for:
Futures (NQ, ES, Gold)
Forex pairs
Crypto
Stocks near key earnings or breakout zones
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.