Strategy · Pine Script v5 · On the chart

Fractal Sweep Strategy

by abhinaynatraj

A strategy port of the Fractal Sweep CISD indicator.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code385
Settings21inputs
LicenceNone stated
Last update3 months ago4 Jul 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

Fractal Sweep Strategy detects a sweep of a prior candle's extreme, a return and a CISD confirmation, then enters with a stop at the sweep extreme or CISD level and a take profit at a set R:R multiple. Shallow sweep and closed-back filters are on by default, with optional SMT divergence against ES, a session window in Eastern time and a date range. Size can be risk-based from a dollar amount and point value or a fixed contract count. Defaults assume micro Nasdaq futures costs.

Details

Published by

abhinaynatraj on GitHub

Draws

On the price chart

Markets

Indices

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
Risk per Trade ($)float225.0risk_per_trade_usd
Point Value ($/pt)float2.0point_value
Risk-based Sizingbooltrueuse_risk_sizing
Fixed Contractsint1fixed_contracts
Min Risk (pts)float3.0min_risk
Max Risk (pts)float112.5max_risk
CISD Lookback Barsint100cisd_lookback
Stop-Loss AtstringSweep Extremesl_mode
R:R Targetfloat1.0rr_ratio
Require Shallow Sweep (F3)booltrueuse_shallow_sweep
Require Closed Back Inside (F4)booltrueuse_closed_back
Require SMT Divergenceboolfalseuse_smt
Show all 21 settings
SettingTypeDefaultVariable
SMT SymbolstringES1!smt_symbol
Restrict to Sessionbooltrueuse_session
Session Start Hour (ET)int7sess_start
Session End Hour (ET)int16sess_end
Restrict to Date Rangeboolfalseuse_date_filter
Start Datetimetimestamp("2020-01-01T00:00:00")date_start
End Datetimetimestamp("2030-01-01T00:00:00")date_end
Show Entry Markersbooltrueshow_entries
Draw SL/TP Linesbooltrueshow_sl_tp
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

UnfairValueGap B003

by ruckard
13 stars

This strategy calculates the distance between the current price and the opposite end of a recent price gap. It trades against gap completion under the assumption that price will resume the prevailing trend after a partial gap fill. Take profit and stop loss va

Strategy v5 SMC / ICT / price actionMoving averages
Updated 1 year ago · None stated GitHub repository of UnfairValueGap B003

Order Block Strategy

by muammeryldrm42
7 stars

This strategy identifies bullish and bearish order blocks using an average true range impulse filter and plots corresponding boxes on the price chart. It enters positions on price retests of the order block zones, optionally filtered by an exponential moving a

Strategy v5 SMC / ICT / price actionTrend
Updated 3 months ago · MIT GitHub repository of Order Block Strategy
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]

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