1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
Premarket Gap Scalper qualifies a symbol by gap size, price band and premarket volume, then trades an opening-range breakout with a volume surge, limited to a set number of trades per day and a cut-off hour in New York time. The stop is an ATR multiple, optionally no lower than the opening-range low. Half is banked at one R and the rest trails with an ATR multiple. Presets, a date range and a dashboard are included.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Setting chain
string
Custom
preset
Limit backtest to date range
bool
false
useRange
Start
time
timestamp("1 Jan 2025 00:00 +0000")
rangeStart
End
time
timestamp("1 Jan 2027 00:00 +0000")
rangeEnd
Min gap %
float
4.0
minGapIn
Max gap % (blowoff cap)
float
60.0
maxGapIn
Min price $
float
2.0
minPriceIn
Max price $
float
100.0
maxPriceIn
Min PM volume vs 20d PM avg (x)
float
2.0
minPmRvolIn
Opening range (minutes)
int
5
orMinutesIn
Max trades per day
int
3
maxTradesIn
No entries after (ET hour)
int
11
lastEntryHIn
Show all 16 settings
Setting
Type
Default
Variable
Entry volume surge (x 20-bar avg)
float
1.5
volSurgeIn
Initial stop: ATR multiple
float
1.5
atrMultIn
Runner trail: ATR multiple
float
2.0
trailMultIn
Stop no lower than OR low
bool
true
useOrLowIn
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This strategy tracks an opening session time range to establish directional bias and triggers pullback trades using Stochastic RSI. Once price breaks out of the initial range, it establishes a directional bias and enters when the Stochastic RSI crosses over in
This script monitors opening gap conditions and breakout behavior relative to the first candle's range across up to twenty configurable stock tickers. It detects whether following bars remain inside the opening range before breaking out, displaying the status
This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim
This overlay strategy targets one-minute ATOM scalps. It tracks pivot highs and lows as resistance and support, compares a three-period EMA with a multi-stage smoothed close, and flags long or short when price crosses that curve in the matching direction. Dail
This strategy enters long when price closes above the prior Donchian high and short when it closes below the prior Donchian low, only while flat and inside a Taipei-hour window. It exits on a MACD histogram reversal or through an ATR stop and a percentage take
This intraday strategy implements Mark Fisher's Opening Range Breakout (ORB) methodology tailored for index futures like ES and NQ. It calculates session opening ranges, volume z-scores, and VWAP bands to plot support, resistance, and confirmation levels on th