Strategy · Pine Script v6 · On the chart

ORB + ICT Backtest Strategy v1

by mccallister-dev

A Strategy Tester script for opening range breakouts during Asian, London or New York sessions.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code399
Settings31inputs
LicenceNone stated
Last update5 weeks ago23 Sep 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 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

The range length is selectable, and entries use a close breakout, a break with retest, or a fuller sequence including a liquidity sweep and reclaim. Direction, bias filter and date window are inputs. Orders are placed from confirmed bars and fill on the next open. The stop is set at the opposite side of the range or by ATR, the target is a risk-reward multiple, size comes from an equity risk percentage with a leverage cap, and open trades can be closed at session end.

Details

Published by

mccallister-dev on GitHub

Draws

On the price chart

Markets

Forex

Timeframes

M15-H1

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Start datetimetimestamp("01 Jan 2023 00:00 +0000")testStart
End datetimetimestamp("31 Dec 2035 23:59 +0000")testEnd
Trade directionstringBothtradeDirection
Entry modelstringBreak + retestentryModel
Preferred session modestringAutopreferredSessionMode
Manual preferred sessionstringNew YorkmanualPreferredSession
ORB sessionstringAutoorbSessionChoice
ORB duration (minutes)string30orbDurationChoice
Custom ORB minutesint20orbCustomMinutes
Asian sessionsession0000-0800:1234567asianSession
Asian timezonestringEurope/LondonasianTimezone
London sessionsession0800-1600:1234567londonSession
Show all 31 settings
SettingTypeDefaultVariable
London timezonestringEurope/LondonlondonTimezone
New York sessionsession0800-1700:1234567newYorkSession
New York timezonestringAmerica/New_YorknewYorkTimezone
Shade selected sessionbooltrueshowSessionShade
Show ORB levelsbooltrueshowOrbLevels
Validation modestringStandardvalidationMode
Minimum ORB break distance (ticks)int1minimumBreakTicks
Liquidity sweep distance (ticks)int1sweepToleranceTicks
Retest tolerance (ticks)int2retestToleranceTicks
Maximum bars to retestint20maxRetestBars
Directional filterstringNonebiasFilter
Equity risk per trade (%)float1.0riskPercent
Exposure cap leveragefloat500.0brokerLeverage
Stop modelstringOpposite ORBstopModel
ATR stop multiplefloat1.5stopAtrMultiple
Stop buffer (ticks)int2stopBufferTicks
Profit target (R)float2.0rewardRisk
Close open trade after sessionbooltruecloseAtSessionEnd
CostsstringSet broker spread/fees in PropertiescostsReminder
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.

Similar Pine Scripts

6 stars

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

Strategy v5 BreakoutSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of Advanced ORB + ICT Strategy

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

Strategy v6 SMC / ICT / price actionTrend
Updated 2 months ago · MIT GitHub repository of GBP/USD Market Structure [trugurpala]

FYP Bot 1

by aleks-drozy
2 stars

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

Strategy v6 SMC / ICT / price actionTrend
Updated 2 months ago · MIT GitHub repository of FYP Bot 1

More Breakout scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers