A strategy for gold futures based on the initial balance, the high and low of a set New York time window that starts at 9:30 and ends at 10:30 by default.
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
Ranges outside a minimum and maximum percent of price are skipped. After price breaks the range, it waits for a retracement of a chosen fraction back into it, with a volume confirmation, then enters. Target and stop are multiples of the range, open trades close at end of day, and a daily loss cap halts trading.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
IB Start Hour (ET)
int
9
i_ibStartHour
IB Start Min (ET)
int
30
i_ibStartMin
IB End Hour (ET)
int
10
i_ibEndHour
IB End Min (ET)
int
30
i_ibEndMin
Min IB Range % of Price
float
0.30
i_minRangePct
Max IB Range % of Price
float
1.50
i_maxRangePct
Retracement Level (fraction of IB)
float
0.25
i_retracePct
Volume Confirm Multiplier
float
1.2
i_volMult
Volume Avg Length
int
20
i_volLen
TP (x IB Range)
float
0.5
i_tpMult
SL (x IB Range)
float
0.6
i_slMult
EOD Hour (ET)
int
16
i_eodHour
Show all 14 settings
Setting
Type
Default
Variable
EOD Min (ET)
int
0
i_eodMin
Max Daily Loss ($)
float
500.0
i_maxDailyLoss
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 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 overlay strategy tracks the high and low of a user-defined London session and plots the previous session levels as support and resistance. It flags a break beyond a level when price closes past an ATR buffer, then waits a set number of bars for a retest w
This strategy combines Opening Range Breakout (ORB) mechanics with Inner Circle Trader (ICT) concepts like Fair Value Gaps, Order Blocks, and liquidity grabs. It identifies session opening ranges and generates signals when price breaks out with supporting rela
This strategy detects Opening Range Breakouts in a specified session. It calculates the high and low of the opening range bar then plots these levels on the price chart and fills the area between them. Candles are colored based on their relation to the ORB hig
A strategy-type script for the price chart that marks the high, low and midpoint of the first part of each session, set by start hour and minute inputs, and alerts when price crosses above the high or below the low. It also plots VWAP and a 50-period EMA, pivo
A strategy built around the first regular-session candle of the US day in New York time, together with rejection levels collected from wicks formed during pre-market and after-hours sessions. Rejection levels within a tolerance percentage are grouped. Options