Indicator · Pine Script v6 · On the chart

Order Flow Strategy (OFS)

by roan-maverick

The Order Flow Strategy is a chart overlay indicator based on auction market theory and order flow concepts.

View on GitHub

Repaints

GitHub stars69on the repository
Pine versionv6current
Lines of code1,776
Settings40inputs
LicenceCustom licence
Last update10 days ago14 Nov 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 indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

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

Order Flow Strategy (OFS) evaluates higher-timeframe value structure across custom timeframes alongside value area profiles (VAH, POC, VAL) and Fibonacci discount or premium zones. It detects trapped liquidity and aggressive order flow absorption to highlight potential setups during specified session windows. The indicator displays targets, stop levels, and a dashboard panel on the main price chart. Settings configure session hours, daily trade caps, consecutive loss rules, profile periods, and gamma levels.

Details

Published by

roan-maverick on GitHub

Draws

On the price chart

Markets

Any symbol

Timeframes

M1-M5, M15-H1

Risk Notes

  • Reads higher-timeframe data with lookahead on, so the history can show signals that were not there in real time

Settings

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

SettingTypeDefaultVariable
Layered glow effectsbooltrueglowOn
Color event candles (absorption, entries)booltruecolorEvents
Color all other candles by deltaboolfalsecolorByDelta
Tint the trade windowbooltrueshowWindowBg
Buyers · Neon Greencolor#00FF9CcBull
Sellers absorbed · long targets · Electric Cyancolor#00E5FFcCyan
Sellers · Neon Redcolor#FF2D55cBear
Buyers absorbed · short targets · Magentacolor#FF2BD6cMagenta
Sellers wave · Purplecolor#A855F7cPurple
Value area · Indigocolor#536DFEcValue
Point of control · Goldcolor#FFC400cGold
Absorption · invalidation · Ambercolor#FF9F1CcAmber
Show all 40 settings
SettingTypeDefaultVariable
Text · Silvercolor#C0C6D4cSilver
Muted · Greycolor#6B7280cGrey
Trade windowstringMODE_NYwindowMode
Custom sessionsession0930-1100customSess
Custom session timezonestringAmerica/New_YorkcustomTz
Max trades per dayint2maxTrades
Stop for the day after consecutive lossesint2maxLossStreak
Structure timeframe 1timeframe60htf1
Structure timeframe 2timeframe240htf2
Structure swing strengthint3htfSwing
Gamma regime (from your GEX source)stringNot setgexRegime
Call wall (0 = off)float0callWall
Put wall (0 = off)float0putWall
Gamma flip (0 = off)float0gammaFlip
Skip setups in positive gammaboolfalseskipPosGamma
Value areastringDeveloping (current session)vaSource
Session lengthstringDailyprofilePeriod
Cash session hourssession0930-1600cashSess
Cash session timezonestringAmerica/New_YorkcashTz
Value area %float70vaPct
Profile row height (x ATR)float0.5rowAtr
Developing value: minimum barsint12minDevBars
Swing strength (bars each side)int5swingLen
Impulse leg lookback (bars)int60legLookback
Zone level 1float0.705fibA
Zone level 2float0.788fibB
Zone level 3 (invalidation)float0.886fibC
Zone must sit outside the value areabooltrueneedOutsideVA
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

Cumulative Volume Delta Strategy by Flux Charts is an overlay indicator that combines anchored Cumulative Volume Delta analysis with Smart Money Concepts structure detection. It generates buy and sell signals based on price retracements into identified Fair Va

Indicator v5 SMC / ICT / price actionVolume
Updated 2 weeks ago · MIT GitHub repository of Cumulative Volume Delta Strategy | Flux Charts

This indicator overlays Wyckoff schematic analysis on the chart, identifying accumulation and distribution phases (A through E) alongside key events like Selling Climax, Automatic Rally, Spring, UTAD, and Sign of Strength. It calculates range quality scores, a

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 weeks ago · MIT GitHub repository of Wyckoff Schematics [WavesUnchained]

SMC+WWAP+FVG+TBT

by IAMATOMIC001
3 stars

This overlay indicator maps market structure and a volume-weighted average on the price chart. It plots bullish and bearish structure from a pivot period, with an optional response length for shorter or longer structure. Premium and discount areas can be shade

Indicator v6 SMC / ICT / price actionVolume Repaints
Updated 1 year ago · None stated GitHub repository of SMC+WWAP+FVG+TBT

Volume & Key Levels

by MoDarK-MK
3 stars

This overlay indicator template plots previous-day and previous-week highs and lows and marks liquidity sweeps when price pierces a level on elevated volume and closes back inside. It builds a rolling volume profile with point of control and value area, plus a

Indicator v6 VolumeSupport & resistance
Updated 2 months ago · MPL-2.0 GitHub repository of Volume & Key Levels

OWS Context

by vishnu-vardhan-d
2 stars

This indicator evaluates institutional market structure by tracking five core behaviors: liquidity sweeps with reclaims, stopping volume, range compression and expansion, breaks of structure, and order block mitigations. When a user-defined minimum number of p

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 6 weeks ago · MIT GitHub repository of OWS Context

More SMC / ICT 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