OPEN-SOURCE SCRIPT
RDBRB Strategy with Filters + Cooldowns + Labels

RDBRB Strategy with Filters + Cooldowns
This script implements the RDBRB (Rally-Drop-Base-Retest-Breakout) strategy, a classic price action setup designed to identify structured trade opportunities using volume, volatility bands, and trend alignment. It’s ideal for traders looking for clean, rule-based entries across any timeframe.
🧠 Core Components
Rally & Drop Detection
Identifies short-term momentum shifts using moving average crossovers:
✅ Ra = Rally (bullish crossover)
🔻 Dr = Drop (bearish crossunder)
Base Formation
A statistical base is defined using a moving average with a standard deviation envelope (Upper/Lower BB). This forms the foundation for breakout or retest setups.
Retest Zone (RT)
When price returns to the lower band (but stays below the base), it suggests a potential re-accumulation or reaction zone before a breakout.
Breakout Confirmation (BO)
A breakout is validated when:
Price crosses above the upper band
Volume exceeds the 20-bar average by a threshold multiplier
RSI is above a bullish momentum level
Price is trending above the longer-term EMA
⏱️ Smart Cooldown Logic
Each signal (Rally, Drop, Retest, Breakout) has an independent cooldown timer to prevent multiple triggers within a short range, filtering out noise and duplicate signals:
Customizable cooldown periods via input settings
Ensures signals are meaningful and not clustered
💡 Visual Markers
All signals are shown as small, color-coded labels:
Ra: Green label below bar
Dr: Red label above bar
RT: Yellow label below bar
BO: Green breakout label below bar
Bands and base are plotted for structure reference.
🛠️ Customizable Settings
Cooldown periods for each signal type
MA lengths, volume and RSI thresholds
Trend filter and base calculation inputs
This script is ideal for price action traders who want a clean, structured method to trade consolidations and trend continuations while avoiding over-signaling. Use it on any timeframe and combine with higher-timeframe confirmation for best results.
This script implements the RDBRB (Rally-Drop-Base-Retest-Breakout) strategy, a classic price action setup designed to identify structured trade opportunities using volume, volatility bands, and trend alignment. It’s ideal for traders looking for clean, rule-based entries across any timeframe.
🧠 Core Components
Rally & Drop Detection
Identifies short-term momentum shifts using moving average crossovers:
✅ Ra = Rally (bullish crossover)
🔻 Dr = Drop (bearish crossunder)
Base Formation
A statistical base is defined using a moving average with a standard deviation envelope (Upper/Lower BB). This forms the foundation for breakout or retest setups.
Retest Zone (RT)
When price returns to the lower band (but stays below the base), it suggests a potential re-accumulation or reaction zone before a breakout.
Breakout Confirmation (BO)
A breakout is validated when:
Price crosses above the upper band
Volume exceeds the 20-bar average by a threshold multiplier
RSI is above a bullish momentum level
Price is trending above the longer-term EMA
⏱️ Smart Cooldown Logic
Each signal (Rally, Drop, Retest, Breakout) has an independent cooldown timer to prevent multiple triggers within a short range, filtering out noise and duplicate signals:
Customizable cooldown periods via input settings
Ensures signals are meaningful and not clustered
💡 Visual Markers
All signals are shown as small, color-coded labels:
Ra: Green label below bar
Dr: Red label above bar
RT: Yellow label below bar
BO: Green breakout label below bar
Bands and base are plotted for structure reference.
🛠️ Customizable Settings
Cooldown periods for each signal type
MA lengths, volume and RSI thresholds
Trend filter and base calculation inputs
This script is ideal for price action traders who want a clean, structured method to trade consolidations and trend continuations while avoiding over-signaling. Use it on any timeframe and combine with higher-timeframe confirmation for best results.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.