OPEN-SOURCE SCRIPT
RSI Bands + FVG Dynamic Box + ADX [Clean & Fixed]

1. Understanding the 3 Core Signals of the Indicator
RSI Bands (Upper, Lower, and Gray Midline)
Red Line (UB): Acts as a strong price resistance line, equivalent to RSI 70 (Overbought).
Green Line (LB): Acts as a strong price support line, equivalent to RSI 30 (Oversold).
Gray Line (Mid): Represents the trend filter, equivalent to RSI 50 (Bullish bias when price is above, Bearish bias when below).
FVG Dynamic Boxes (Aqua / Orange Boxes)
Aqua Box (Bullish FVG): A liquidity gap created when smart money aggressively pumps the price. It serves as a strong support zone when price retraces. The box automatically disappears when completely broken downwards.
Orange Box (Bearish FVG): A liquidity gap created when smart money aggressively dumps the price. It serves as a strong resistance zone during relief rallies. The box automatically disappears when completely broken upwards.
Purple Candle (ADX Reversal from Squeeze)
Indicates a trend pivot point where trend strength (ADX) hooks up from the squeeze zone (below 20), signaling the start of a strong directional move.
2. Practical Trading Strategies (Entry, Stop Loss, Take Profit)
🟢 Long (Buy) Strategy: Dip Buying with Trend Continuation
This setup enters at the exact pullback zone where market makers shake out retail traders before expanding the price upwards.
Setup Checklist: Wait for an Aqua Box (Bullish FVG) to form, and let the price pull back into this box area.
Entry Trigger: Enter a Long position when the price finds support inside the Aqua Box AND a Purple Candle (ADX Reversal) prints, or when the price convincingly breaks above the Gray Midline.
Stop Loss: Place your stop loss right below the Bottom of the Aqua Box (Invalidation point where institutional support fails).
Take Profit: Scale out or exit the position when the price reaches or pierces the Red Upper Band (Resistance).
🔴 Short (Sell) Strategy: Rejection at Supply Zone
This setup capitalizes on trapped buyers during a relief rally into institutional supply zones before the next leg down.
Setup Checklist: Wait for an Orange Box (Bearish FVG) to form, and let the price rally up into this orange box area.
Entry Trigger: Enter a Short position when the price gets rejected inside the Orange Box AND a Purple Candle (ADX Reversal) prints, or when the price breaks down below the Gray Midline.
Stop Loss: Place your stop loss right above the Top of the Orange Box.
Take Profit: Exit the position when the price slides down to the Green Lower Band (Support).
💡 Golden Trading Tips for This System
Box Lifespan: Thanks to the dynamic code logic, boxes stop expanding when the price mitigates (fills) the gap. Therefore, longer boxes indicate much stronger, unmitigated institutional orders than short-lived ones.
The Rule of the Purple Candle: A purple candle does not blindly mean "buy." It simply means "volatility is exploding in one direction." Always use the Gray Midline as a directional filter: if a purple candle appears while the price is above the midline, look for longs. If it appears below the midline, look for shorts.
RSI Bands (Upper, Lower, and Gray Midline)
Red Line (UB): Acts as a strong price resistance line, equivalent to RSI 70 (Overbought).
Green Line (LB): Acts as a strong price support line, equivalent to RSI 30 (Oversold).
Gray Line (Mid): Represents the trend filter, equivalent to RSI 50 (Bullish bias when price is above, Bearish bias when below).
FVG Dynamic Boxes (Aqua / Orange Boxes)
Aqua Box (Bullish FVG): A liquidity gap created when smart money aggressively pumps the price. It serves as a strong support zone when price retraces. The box automatically disappears when completely broken downwards.
Orange Box (Bearish FVG): A liquidity gap created when smart money aggressively dumps the price. It serves as a strong resistance zone during relief rallies. The box automatically disappears when completely broken upwards.
Purple Candle (ADX Reversal from Squeeze)
Indicates a trend pivot point where trend strength (ADX) hooks up from the squeeze zone (below 20), signaling the start of a strong directional move.
2. Practical Trading Strategies (Entry, Stop Loss, Take Profit)
🟢 Long (Buy) Strategy: Dip Buying with Trend Continuation
This setup enters at the exact pullback zone where market makers shake out retail traders before expanding the price upwards.
Setup Checklist: Wait for an Aqua Box (Bullish FVG) to form, and let the price pull back into this box area.
Entry Trigger: Enter a Long position when the price finds support inside the Aqua Box AND a Purple Candle (ADX Reversal) prints, or when the price convincingly breaks above the Gray Midline.
Stop Loss: Place your stop loss right below the Bottom of the Aqua Box (Invalidation point where institutional support fails).
Take Profit: Scale out or exit the position when the price reaches or pierces the Red Upper Band (Resistance).
🔴 Short (Sell) Strategy: Rejection at Supply Zone
This setup capitalizes on trapped buyers during a relief rally into institutional supply zones before the next leg down.
Setup Checklist: Wait for an Orange Box (Bearish FVG) to form, and let the price rally up into this orange box area.
Entry Trigger: Enter a Short position when the price gets rejected inside the Orange Box AND a Purple Candle (ADX Reversal) prints, or when the price breaks down below the Gray Midline.
Stop Loss: Place your stop loss right above the Top of the Orange Box.
Take Profit: Exit the position when the price slides down to the Green Lower Band (Support).
💡 Golden Trading Tips for This System
Box Lifespan: Thanks to the dynamic code logic, boxes stop expanding when the price mitigates (fills) the gap. Therefore, longer boxes indicate much stronger, unmitigated institutional orders than short-lived ones.
The Rule of the Purple Candle: A purple candle does not blindly mean "buy." It simply means "volatility is exploding in one direction." Always use the Gray Midline as a directional filter: if a purple candle appears while the price is above the midline, look for longs. If it appears below the midline, look for shorts.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.