Strategy · Pine Script v6 · On the chart

TnSovereignMarketStructureV20

by raybird

This strategy draws on the price chart and trades structural breakouts.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code107
Settings6inputs
LicenceNone stated
Last update2 months ago15 Aug 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

TnSovereignMarketStructureV20 stores confirmed pivot highs and lows, then looks for a close beyond the last pivot in the direction of an exponential moving average. A thermodynamic check must also pass, with free energy above a minimum and fractal entropy below a maximum. Long and short entries are allowed only on a confirmed bar while the position is flat, using ten percent of equity by default. ATR stop and reward-ratio inputs are defined, but the shown code does not include the exit orders.

Details

Published by

raybird on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

SMC / ICT / price action, Breakout, Trend

Markets

Any symbol

Timeframes

Any timeframe

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
Pivot Lookbackint5pivot_len
Trend EMA Filterint50trend_len
Min Free Energyfloat1.5min_energy
Max Fractal Entropy (D)float1.4max_entropy
SL ATR Multiplefloat1.5sl_atr_mult
Target R:R Ratiofloat3.0tp_rr
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

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

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

Qtus SMC-Sniper AutoTrader v2 is an automated trading strategy plotted on the price chart that combines Smart Money Concepts (SMC), ICT frameworks, price action patterns, and technical indicators into a multi-factor scoring engine. It enters long or short posi

Strategy v6 SMC / ICT / price actionTrend
Updated 2 months ago · Custom licence GitHub repository of Qtus SMC-Sniper AutoTrader v2

PF IES probe 06 - pivot sweep

by pineforge-4pass
1 stars

This Pine Script strategy detects pivot liquidity sweeps on the price chart. It identifies swing highs and lows using ta.pivothigh and ta.pivotlow with user-defined left and right bar counts. The script maintains state for the last confirmed pivot and flags a

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 5 days ago · Apache-2.0 GitHub repository of PF IES probe 06 - pivot sweep

More strategys

Trade Your Charts With a Regulated Broker

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

Compare brokers