OPEN-SOURCE SCRIPT
Gap Reversal

Gap Reversal (1m Gap Fade Screener + Entries)
Gap Reversal is a 1-minute, opening-drive indicator designed to spot early gap-fade opportunities using price action + Stochastic alignment, while also providing a quick “screener” table for liquidity and premarket context.
Indicator Parts
1) Screener Table (top corner)
* Gap %: Previous day close → today open (green when within the configured gap window, default 4%–20%; red otherwise)
* Market Cap (USD): Green if > $2B, red otherwise (estimated from shares outstanding × price, converted to USD when applicable)
* Average Daily Volume: Green if ≥ 1M, red otherwise (default 20-day average)
* Premarket Volume: Green if ≥ 200K, red otherwise (accumulated during the configured premarket session)
2) Entry Signals (computed on true 1-minute data)
Signals are always evaluated on 1m, and will display on any chart timeframe via lower-TF aggregation.
* Long (Gap Up Fade)
* Day opens above prior regular-session close (gap up), and gap size is within the configured range
* Signal occurs in the first N minutes (default 12 1m bars)
* Candle closes in the top third of its range
* Price is not below 1/3 of the gap size from the open (protects against over-extension)
* At least one red candle occurred before the signal (within the lookback window)
* Stochastic (5,3,3): %K > %D
* Short (Gap Down Fade)
* Day opens below prior regular-session close (gap down), and gap size is within the configured range
* Signal occurs in the first N minutes (default 12 1m bars)
* Candle closes in the bottom third of its range
* Price is not above 1/3 of the gap size from the open
* At least one green candle occurred before the signal (within the lookback window)
* Stochastic (5,3,3): %D > %K
Visuals
* Green up arrow + “Enter Long” when long conditions trigger
* Red down arrow + “Enter Short” when short conditions trigger
* Reference lines for prior day close, today open, and the 1/3 gap levels
Inputs you can customize
* Gap % min/max, opening window length, prior candle lookback windows
* Stochastic parameters (K length, K smoothing, D smoothing) and Low/High thresholds (thresholds are configurable for your workflow)
Alerts
Includes built-in alert conditions:
* Gap Reversal Enter Long
* Gap Reversal Enter Short
Note: This indicator is intended for screening and signal marking. Always validate signals with your ticker’s liquidity, spread, and your execution rules.
Happy Trading!
Yuval.
Gap Reversal is a 1-minute, opening-drive indicator designed to spot early gap-fade opportunities using price action + Stochastic alignment, while also providing a quick “screener” table for liquidity and premarket context.
Indicator Parts
1) Screener Table (top corner)
* Gap %: Previous day close → today open (green when within the configured gap window, default 4%–20%; red otherwise)
* Market Cap (USD): Green if > $2B, red otherwise (estimated from shares outstanding × price, converted to USD when applicable)
* Average Daily Volume: Green if ≥ 1M, red otherwise (default 20-day average)
* Premarket Volume: Green if ≥ 200K, red otherwise (accumulated during the configured premarket session)
2) Entry Signals (computed on true 1-minute data)
Signals are always evaluated on 1m, and will display on any chart timeframe via lower-TF aggregation.
* Long (Gap Up Fade)
* Day opens above prior regular-session close (gap up), and gap size is within the configured range
* Signal occurs in the first N minutes (default 12 1m bars)
* Candle closes in the top third of its range
* Price is not below 1/3 of the gap size from the open (protects against over-extension)
* At least one red candle occurred before the signal (within the lookback window)
* Stochastic (5,3,3): %K > %D
* Short (Gap Down Fade)
* Day opens below prior regular-session close (gap down), and gap size is within the configured range
* Signal occurs in the first N minutes (default 12 1m bars)
* Candle closes in the bottom third of its range
* Price is not above 1/3 of the gap size from the open
* At least one green candle occurred before the signal (within the lookback window)
* Stochastic (5,3,3): %D > %K
Visuals
* Green up arrow + “Enter Long” when long conditions trigger
* Red down arrow + “Enter Short” when short conditions trigger
* Reference lines for prior day close, today open, and the 1/3 gap levels
Inputs you can customize
* Gap % min/max, opening window length, prior candle lookback windows
* Stochastic parameters (K length, K smoothing, D smoothing) and Low/High thresholds (thresholds are configurable for your workflow)
Alerts
Includes built-in alert conditions:
* Gap Reversal Enter Long
* Gap Reversal Enter Short
Note: This indicator is intended for screening and signal marking. Always validate signals with your ticker’s liquidity, spread, and your execution rules.
Happy Trading!
Yuval.
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.