OPEN-SOURCE SCRIPT
Gap Down Reversal Strategy

█ STRATEGY OVERVIEW
The "Gap Down Reversal Strategy" capitalizes on price recovery patterns following bearish gap-down openings. This mean-reversion approach enters long positions on confirmed intraday recoveries and exits when prices breach previous session highs. This strategy is NOT optimized.
█ What is a Gap Down Reversal?
A gap down reversal occurs when:
█ SIGNAL GENERATION
1. LONG ENTRY CONDITION
2. EXIT CONDITION
█ PERFORMANCE OVERVIEW
The "Gap Down Reversal Strategy" capitalizes on price recovery patterns following bearish gap-down openings. This mean-reversion approach enters long positions on confirmed intraday recoveries and exits when prices breach previous session highs. This strategy is NOT optimized.
█ What is a Gap Down Reversal?
A gap down reversal occurs when:
- An instrument opens significantly below its prior session's low (price gap)
- Selling pressure exhausts itself during the session
- Buyers regain control, pushing price back above the opening level
- Creates a candlestick with:
• Open < Prior Session Low (true gap)
• Close > Open (bullish reversal candle)
█ SIGNAL GENERATION
1. LONG ENTRY CONDITION
- Previous candle closes BELOW its opening price (bearish candle)
- Current session opens BELOW prior candle's low (gap down)
- Current candle closes ABOVE its opening price (bullish reversal)
- Executes market order at session close
2. EXIT CONDITION
- A Sell Signal is generated when the current closing price exceeds the highest high of the previous seven bars (`close > _highest[1]`). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ PERFORMANCE OVERVIEW
- Ideal Market: High volatility instruments with frequent gaps
- Key Risk: False reversals in sustained downtrends
- Optimization Tip: Test varying gap thresholds (1-3% ranges)
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.
For quick access on a chart, add this script to your favorites — learn more here.
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.
For quick access on a chart, add this script to your favorites — learn more here.
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.