Py’otrMuhammad Toheed Sahar

ICT / Smart Money Concepts Indicator for TradingView

I turned the ICT and Smart Money Concepts method into a TradingView indicator that marks structure, liquidity, fair value gaps and order blocks on the chart automatically, built for gold.

Client
Own project
Year
2026
Type
Automation & bots

The problem

In this trading method, levels are marked by hand: structure breaks, liquidity pools, fair value gaps, order blocks and the day's bias. That is slow and the markings drift from chart to chart. The goal was to have all of it drawn automatically and cleanly, with alerts, on gold and on other pairs.

How I built it

I wrote the specification first: a technical document in 20 sections covering structure mapping, liquidity, fair value gaps, blocks, strength rating, daily bias, time windows, alerts and history management. I then built it in Pine Script v5 in ordered sections (helpers, more than 100 grouped inputs, user-defined types, shared state, module functions, one execution block) with an on/off switch and colour options for every feature. A matching Python version of the same modules runs on gold price data with an interactive browser chart and Telegram-ready alert JSON.

What got hard

  1. An indicator that repaints is useless to a trader, because a signal that moves after the candle closes cannot be trusted.

    Anti-repaint was a design rule from the specification. Daily-timeframe data is requested with lookahead switched off, and alerts fire only once per bar close on confirmed bars.

  2. Pine Script caps the number of lines, boxes and labels, and a chart crowded with all of them stops being readable.

    The script declares 500 slots for each, a 5,000-bar look-back, a per-feature history length in days, and options to grey out or hide mitigated gaps so the chart stays clean.

The result

Two Pine Script versions (1,814 and 1,446 lines), a 1,991-line Python implementation and the full written specification. It marks levels and sends alerts; it does not trade, and no backtest result is claimed.