Indicator · Pine Script v5 · On the chart

ICT State Machine

by alboogycOdR

This overlay indicator walks price through a configurable ICT state sequence on the chart.

View on GitHub

GitHub stars6on the repository
Pine versionv5runs as is
Lines of code712
Settings33inputs
LicenceNone stated
Last update7 months ago16 Mar 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

ICT State Machine can require a four-hour CRT bias, an Asian range, manipulation, a New York macro window, a liquidity sweep, a market structure shift, CISD, a fair value gap, and a retracement into that gap before marking an entry-ready state. Presets toggle which stages are required. It draws state-flow labels, a state dashboard, and optional entry zones. It does not place orders or define exits.

Details

Published by

alboogycOdR on GitHub

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

SMC / ICT / price action, Sessions & time, Screeners & dashboards

Markets

Any symbol

Timeframes

M1-M5, 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
★ Use 4-Hour CRT for Bias?booltrueenableHtfBias
1. Require Asian RangebooltrueenableAsianRange
2. Require ManipulationbooltrueenableManipulation
3. Require Macro WindowbooltrueenableMacro
4. Require Liquidity SweepbooltrueenableSweep
5. Require Market Structure ShiftbooltrueenableMSS
6. Require CISDbooltrueenableCISD
7. Require Fair Value GapbooltrueenableFVG
8. Require Retracement to FVGbooltrueenableRetracement
Quick PresetsstringCustompreset
Show State Flow LabelsbooltrueshowStateFlow
Show State DashboardbooltrueshowStateTable
Show all 33 settings
SettingTypeDefaultVariable
Show Entry ZonesbooltrueshowEntryZones
Show Debug InfoboolfalseshowDebugInfo
Show Skipped StatesbooltrueshowSkippedStates
Show Historic Events (Last 7 Days)boolfalseshowHistoricEvents
Asian Sessionsession1900-0200asianSession
London Sessionsession0200-0700londonSession
NY Sessionsession0700-1200nySession
NY Pre-Open Macro (8:50-9:10)session0850-0910macro1
└─ Enable Pre-Open MacrobooltrueenableMacro1
NY Continuation Macro (9:50-10:10)session0950-1010macro2
└─ Enable Continuation MacrobooltrueenableMacro2
NY Close Macro (10:50-11:10)session1050-1110macro3
└─ Enable Close MacrobooltrueenableMacro3
Min Asian Range %float0.2minAsianRange
Sweep Timeout (bars after macro)int10sweepTimeout
MSS Timeout (bars after sweep)int5mssTimeout
Min CISD Candlesint3cisdMinCandles
Min FVG Size (% of ATR)float0.1fvgMinSize
Retracement Timeout (bars)int20retracementTimeout
Risk Per Trade %float1.0riskPercent
Account Balancefloat10000accountBalance
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

Golden Bullet Strategy

by TradersPost
218 stars

The Golden Bullet Strategy is an overlay signal indicator based on Smart Money Concepts and time-based liquidity models. It identifies liquidity sweeps of a designated reference session range during a specified hunt window. It then confirms Market Structure Sh

Indicator v6 SMC / ICT / price actionSessions & time
Updated 3 months ago · None stated GitHub repository of Golden Bullet Strategy

This indicator detects and draws the first Fair Value Gap (FVG) that forms in each hourly session based on a selected lower timeframe, with specialized handling for Regular Trading Hours (RTH) confluence windows. It draws FVG range boxes, midpoint lines, hourl

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints

Clusterbreak

by Jferheart
15 stars

This indicator identifies Break of Structure (BOS) and Market Structure Shift (MSS) zones, plotting automated bracket levels on the price chart. It triggers signals when a reversal breaks a swing point formed inside an opposing zone, projecting stop loss and t

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 4 weeks ago · None stated GitHub repository of Clusterbreak

MyTTFM - Clean

by dbruce1990
12 stars

MyTTFM - Clean draws a higher-timeframe candle overlay on the price chart and marks related ICT fractal structure. It plots configurable HTF candles, period separator lines, midpoint levels, a T-Spot box, and labels for recent C2 and C3 patterns plus swept lev

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of MyTTFM - Clean
9 stars

Smart Money Dashboard plots key Smart Money Concepts on the price chart, including Order Blocks with mitigation tracking, Fair Value Gaps, and Equal Highs or Lows sweeps. It analyzes Cumulative Volume Delta for divergence and combines multi-timeframe structure

Indicator v6 SMC / ICT / price actionVolume
Updated yesterday · MIT GitHub repository of Smart Money Dashboard

This indicator overlays a market structure dashboard on the price chart. It reads up to seven user-selected timeframes, each with an on/off switch and a trend weight, and shows columns for EMA trend, swing highs and lows, structure, order blocks, and fair valu

Indicator v6 Screeners & dashboardsSMC / ICT / price action
Updated 3 months ago · None stated GitHub repository of Market Structure Dashboard | Flux Charts

More indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers