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
Simple mode follows the opening-range direction when relative volume is high enough. ICT mode can require a fair value gap, displacement, and an order block, with a market-structure swing length. Size is set from account risk, capped by equity, with optional Kelly sizing, a daily trade limit, and a daily loss cap. Stops use a share of ATR and targets use a fixed method. A date window limits the test. Higher-timeframe reads use lookahead.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Backtest Start Date
time
timestamp("2023-01-01")
startDate
Backtest End Date
time
timestamp("2025-12-31")
endDate
🎯 Strategy Profile
string
Research Mode
strategyProfile
📚 Use Simple Mode (Research Based)
bool
true
useSimpleMode
Risk Per Trade (%)
float
1.0
accountRiskPercent
Max Position Size (% of equity)
float
25.0
maxPositionSize
Use Kelly Criterion
bool
false
useKellyFormula
Max Trades Per Day
int
3
maxDailyTrades
Max Daily Loss (%)
float
3.0
maxDailyLoss
Session Type
string
New York
orbSessionType
ORB Duration (minutes)
int
15
ORB Duration (minutes)
Custom Start Hour
int
9
orbStartTimeHour
Show all 40 settings
Setting
Type
Default
Variable
Custom Start Minute
int
30
orbStartTimeMinute
Follow Opening Range Direction Only
bool
true
followOpeningBias
Simple Mode RVol Threshold
float
2.0
Simple Mode RVol Threshold
Stop Loss (% of ATR)
float
10.0
Stop Loss (% of ATR)
🔬 Use Enhanced RVol
bool
true
useEnhancedRVol
RVol Lookback Days
int
14
rvolLookbackDays
Require Minimum RVol
bool
true
requireMinRVol
Minimum RVol
float
1.0
minRVolThreshold
Trade Only Top 20 by RVol
bool
false
onlyTopStocks
Entry Method (ICT Mode)
string
FVG
executionType
Require Displacement
bool
true
requireDisplacement
Require Order Block
bool
true
requireOBConfluence
MSS Swing Length
int
10
mssOffset
Enable Range Filter
bool
true
useRangeFilter
Narrow Range (% of ATR)
float
0.5
narrowRangeATR
Wide Range (% of ATR)
float
1.5
wideRangeATR
Avoid Wide Ranges
bool
true
avoidWideRanges
Target Method
string
Fixed
targetMethod
Target R:R Ratio
float
2.0
Target R:R Ratio
Use Partial TP
bool
true
usePartialTakeProfit
Partial TP %
float
50.0
partialTPPercent
Partial TP at R
float
1.0
partialTPRatio
Move to Breakeven
bool
true
moveToBreakeven
Breakeven at R
float
1.0
breakevenRatio
Use Trailing Stop
bool
false
useTrailingStop
Trailing Stop (ATR)
float
2.0
trailingStopATR
Close at End of Day
bool
true
closeEndOfDay
Use HTF Bias
bool
true
useHTFBias
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 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
This strategy evaluates breakout and trend opportunities on the price chart using a weighted composite score of volume, trend, and candlestick structure. It tracks volume spikes, fast and slow EMAs, higher-timeframe EMA trend alignment, opening ranges, and ses
This strategy tracks GBP/USD market structure by storing confirmed pivot highs and lows. It enters long when price crosses above the last pivot high while above a trend EMA, and short when price crosses below the last pivot low while below that EMA. Entries oc
This price-chart strategy scores Smart Money Concepts setups from break of structure, fair value gaps, order blocks, and volume spikes. A minimum score, optional London and New York killzones, and four-hour plus daily bias filter entries. Position size uses a
This strategy executes trades based on a combination of Smart Money Concepts, including Inverse Fair Value Gaps (IFVG) and Change in State of Delivery (CISD) structure breaks. Entries require confluence between IFVG flips, structural CISD breaks, a 20-period e
Smart Money Breakouts strategy is a price-chart overlay strategy that detects breakouts using volume-adjusted swing highs and lows. It calculates candle wicks or bodies, applies ATR-based adjustment for targets, and supports limit-order entries with coefficien