Strategy · Pine Script v6 · On the chart

ORB + ICT Backtest Strategy v2

by mccallister-dev

This strategy defines opening range breakouts within Asian, London and New York sessions using ATR-based width and buffer filters.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code433
Settings40inputs
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

ORB + ICT Backtest Strategy v2 identifies potential entries on breakout after a retest followed by continuation, applying ICT-style context and SMC proxies for confirmation. Signals plot directly on the price chart overlay. Main inputs let users select profile or custom sessions, adjust ORB duration and offset, set entry delay modes, limit signals before session close, and filter by direction and date range. The backtest version supports historical comparisons with pyramiding disabled. Notable limits are absence of built-in stop loss or take profit rules and reliance on discretionary review rather than automated execution.

Details

Published by

mccallister-dev on GitHub

Draws

On the price chart

Markets

Forex

Timeframes

M15-H1, H4 and above

Risk Notes

  • The strategy enters trades without a stop loss

Settings

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

SettingTypeDefaultVariable
ProfilestringAuto research candidateprofile
Sessions to scanstringProfile sessionsessionMode
Custom / fallback sessionstringNew YorkcustomSession
Custom / fallback chart timeframetimeframe5customTf
Require profile chart timeframebooltrueenforceTf
Allowed directionstringProfiledirectionInput
Start datetimetimestamp("01 Jan 2026 00:00 +0200")testStart
Last signal time (plans stay active)timetimestamp("31 Dec 2035 23:59 +0200")testEnd
Asian enabledbooltrueasiaEnabled
Asian windowsession0000-0800asiaSpec
Asian timezonestringEurope/LondonasiaZone
London enabledbooltruelondonEnabled
Show all 40 settings
SettingTypeDefaultVariable
London windowsession0900-1700londonSpec
London timezonestringAfrica/JohannesburglondonZone
New York enabledbooltruenyEnabled
New York windowsession0800-1700nySpec
New York timezonestringAmerica/New_YorknyZone
Monday-Friday session starts onlybooltrueweekdaysOnly
Start ORB this many minutes after session openint0orbOffset
ORB duration (minutes)int30orbMinutes
Entry delay modestringProfile hypothesisdelayMode
Custom minimum delay after session open (minutes)int0customDelay
Delay breakout search tooboolfalsedelayWholeSetup
Stop new signals this many minutes before session endint30lastEntryBuffer
Setup expiry after breakout (bars)int12maxSetupBars
Break / continuation buffer (ATR)float0.05breakAtr
ORB retest tolerance (ATR)float0.15retestAtr
Minimum ORB width (ATR)float0.25minOrbAtr
Maximum ORB width (ATR)float8.0maxOrbAtr
Entry modelstringBreak + retest + continuationentryModel
Context filterstringRequiredcontextMode
Count order-block contextbooltrueuseOb
Count FVG contextbooltrueuseFvg
Count Fibonacci contextbooltrueuseFib
Minimum context matches (not probability)int2minContext
Prior structure lookbackint10structureBars
Last opposing candle searchint10obSearch
Maximum zone age (bars)int60zoneLife
Displacement body / ATRfloat0.6displacementAtr
Minimum FVG width / ATRfloat0.05fvgMinAtr
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

Daily Bias + FVG Strategy

by TradersPost
228 stars

This overlay strategy plots previous-day high and low, the daily open, and fair value gap zones on the price chart. It takes entries on a selectable timeframe when the FVG requirement and an optional session window allow them, then uses an ATR or fixed pip sto

Strategy v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Daily Bias + FVG Strategy
106 stars

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

Strategy v4 Screeners & dashboardsBreakout Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 1St Bar GAP+BkOut Screener v2 by RM

P404 Smoke

by Musyimi97
16 stars

P404 Smoke is a price-chart strategy that sequences an optional higher-timeframe EMA bias, a liquidity range from recent pivots, a sweep of buy-side or sell-side liquidity, and a market structure shift within a set bar window. Comments state it then looks for

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · MIT GitHub repository of P404 Smoke
7 stars

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

Strategy v5 Sessions & timeSupport & resistance
Updated 3 months ago · None stated GitHub repository of London SR Cleaner WR (TP 0.20)

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