ICT.

ICT Chart Analysis Workspace

ICT Smart Analysis Terminal

Rule-based ICT analysis with no AI and no AI API key. Historical analysis runs from TradingView-exported OHLC CSV. Live events arrive through a TradingView Pine Script alert webhook after you configure it.

Trading AI Academy · Rule Engine v1

ICT Smart Analysis Terminal

Automatic ICT calculations from historical OHLC CSV, plus live event updates from your TradingView Pine Script alerts. No AI, no API key, no broker execution.

01 · Market chart

TradingView chart

TradingView's embedded chart is for viewing. It does not expose its OHLC candles to this page; automatic calculations below use uploaded OHLC CSV or webhook events.

02 · Historical engine

Upload TradingView chart data (CSV)

Export chart data from TradingView as CSV, then upload it here. Expected columns: time/date, open, high, low, close, volume (volume optional). The calculations run locally in your browser.

No historical data loaded.

03 · Automatic results

Market structure dashboard

Trend / biasWaiting
Latest structure—
Liquidity sweep—
Latest FVG—
Premium / discount—
Bars analysed0
Upload a CSV to calculate ICT observations.

Detected events

TimeTypeLevel / zoneInterpretation
No events yet.
04 · Live TradingView connector

Live event stream

TradingView sends alerts to your WordPress webhook. Live updates start only after you add the Pine indicator and configure an alert. This is event-based, not a direct market-data feed.

ConnectionNot configured
Latest event—
Symbol—
ReceivedSymbolTimeframeEventTrend / PDCloseOB zoneFVG zoneEQH / EQL
Waiting for TradingView alert webhook.
05 · TradingView Pine indicator

Install the rule indicator in TradingView

  1. Open TradingView and open Pine Editor.
  2. Copy the script below into a new indicator and click Add to chart.
  3. In WordPress Admin → Settings → ICT Rule Engine, copy the webhook URL.
  4. Create a TradingView alert for this indicator using Any alert() function call, enable Webhook URL, and paste the WordPress URL.
  5. Repeat for each symbol and timeframe you want to monitor.
//@version=6
indicator("ICT Rule Engine Alerts · Trading AI Academy", overlay=true, max_labels_count=200, max_boxes_count=100)
pivotLen = input.int(3, "Swing pivot sensitivity", minval=2, maxval=10)
rangeLen = input.int(50, "Premium / discount range", minval=10, maxval=200)
showFVG = input.bool(true, "Show Fair Value Gaps")
showSweeps = input.bool(true, "Show liquidity sweeps")
showStructure = input.bool(true, "Show BOS / MSS")
showEqual = input.bool(true, "Detect equal highs / lows")
ph = ta.pivothigh(high, pivotLen, pivotLen)
pl = ta.pivotlow(low, pivotLen, pivotLen)
var float lastHigh = na
var float lastLow = na
var float previousPivotHigh = na
var float previousPivotLow = na
var int trend = 0
var float obTop = na
var float obBottom = na
var float lastFvgTop = na
var float lastFvgBottom = na
var string lastFvgType = "None"
atr = ta.atr(14)
equalHigh = false
equalLow = false
if not na(ph)
    equalHigh := showEqual and not na(previousPivotHigh) and math.abs(ph - previousPivotHigh) <= atr * 0.12
    previousPivotHigh := ph
    lastHigh := ph
if not na(pl)
    equalLow := showEqual and not na(previousPivotLow) and math.abs(pl - previousPivotLow) <= atr * 0.12
    previousPivotLow := pl
    lastLow := pl
bullBreak = not na(lastHigh) and ta.crossover(close, lastHigh)
bearBreak = not na(lastLow) and ta.crossunder(close, lastLow)
bullMSS = bullBreak and trend == -1
bearMSS = bearBreak and trend == 1
if bullBreak
    trend := 1
    obTop := na
    obBottom := na
    for j = 1 to 10
        if na(obTop) and close[j] < open[j]
            obTop := high[j]
            obBottom := low[j]
if bearBreak
    trend := -1
    obTop := na
    obBottom := na
    for j = 1 to 10
        if na(obTop) and close[j] > open[j]
            obTop := high[j]
            obBottom := low[j]
buySweep = not na(lastHigh) and high > lastHigh and high[1] <= lastHigh and close < lastHigh
sellSweep = not na(lastLow) and low < lastLow and low[1] >= lastLow and close > lastLow
bullFVG = low > high[2]
bearFVG = high < low[2]
if bullFVG
    lastFvgType := "Bullish FVG"
    lastFvgTop := low
    lastFvgBottom := high[2]
if bearFVG
    lastFvgType := "Bearish FVG"
    lastFvgTop := low[2]
    lastFvgBottom := high
rangeHigh = ta.highest(high, rangeLen)
rangeLow = ta.lowest(low, rangeLen)
midpoint = (rangeHigh + rangeLow) / 2
pd = close > midpoint ? "Premium" : close < midpoint ? "Discount" : "Equilibrium"
trendText = trend == 1 ? "Bullish" : trend == -1 ? "Bearish" : "Neutral"
plot(showStructure ? lastHigh : na, "Latest swing high", color=color.new(color.red, 65), style=plot.style_linebr)
plot(showStructure ? lastLow : na, "Latest swing low", color=color.new(color.lime, 65), style=plot.style_linebr)
plot(midpoint, "Dealing range midpoint", color=color.new(color.yellow, 20), style=plot.style_linebr)
plotshape(showStructure and bullBreak, title="Bullish BOS/MSS", style=shape.labelup, text=bullMSS ? "MSS ↑" : "BOS ↑", color=color.new(color.lime, 0), textcolor=color.black, location=location.belowbar)
plotshape(showStructure and bearBreak, title="Bearish BOS/MSS", style=shape.labeldown, text=bearMSS ? "MSS ↓" : "BOS ↓", color=color.new(color.red, 0), textcolor=color.white, location=location.abovebar)
plotshape(showSweeps and buySweep, title="Buy-side sweep", style=shape.triangledown, color=color.orange, location=location.abovebar, text="BSL")
plotshape(showSweeps and sellSweep, title="Sell-side sweep", style=shape.triangleup, color=color.aqua, location=location.belowbar, text="SSL")
plotshape(equalHigh, title="Equal highs", style=shape.circle, color=color.orange, location=location.abovebar, text="EQH")
plotshape(equalLow, title="Equal lows", style=shape.circle, color=color.aqua, location=location.belowbar, text="EQL")
if showFVG and bullFVG
    box.new(bar_index-2, low, bar_index, high[2], bgcolor=color.new(color.lime, 88), border_color=color.new(color.lime, 45))
if showFVG and bearFVG
    box.new(bar_index-2, low[2], bar_index, high, bgcolor=color.new(color.red, 88), border_color=color.new(color.red, 45))
string ev = "Bar update"
if bullMSS
    ev := "Bullish MSS"
else if bearMSS
    ev := "Bearish MSS"
else if bullBreak
    ev := "Bullish BOS"
else if bearBreak
    ev := "Bearish BOS"
else if buySweep
    ev := "Buy-side liquidity sweep"
else if sellSweep
    ev := "Sell-side liquidity sweep"
else if equalHigh
    ev := "Equal highs"
else if equalLow
    ev := "Equal lows"
else if bullFVG
    ev := "Bullish FVG"
else if bearFVG
    ev := "Bearish FVG"
if barstate.isconfirmed and (ev != "Bar update" or barstate.islast)
    string payload = "{\"ticker\":\"" + syminfo.tickerid + "\",\"timeframe\":\"" + timeframe.period + "\",\"event\":\"" + ev + "\",\"trend\":\"" + trendText + "\",\"pd\":\"" + pd + "\",\"close\":" + str.tostring(close) + ",\"range_high\":" + str.tostring(rangeHigh) + ",\"range_low\":" + str.tostring(rangeLow) + ",\"midpoint\":" + str.tostring(midpoint) + ",\"swing_high\":" + (na(lastHigh) ? "null" : str.tostring(lastHigh)) + ",\"swing_low\":" + (na(lastLow) ? "null" : str.tostring(lastLow)) + ",\"fvg_top\":" + (na(lastFvgTop) ? "null" : str.tostring(lastFvgTop)) + ",\"fvg_bottom\":" + (na(lastFvgBottom) ? "null" : str.tostring(lastFvgBottom)) + ",\"ob_top\":" + (na(obTop) ? "null" : str.tostring(obTop)) + ",\"ob_bottom\":" + (na(obBottom) ? "null" : str.tostring(obBottom)) + ",\"equal_highs\":" + str.tostring(equalHigh) + ",\"equal_lows\":" + str.tostring(equalLow) + ",\"bar_time\":" + str.tostring(time) + "}"
    alert(payload, alert.freq_once_per_bar_close)
alertcondition(bullBreak, "Bullish BOS / MSS", "Bullish structure break")
alertcondition(bearBreak, "Bearish BOS / MSS", "Bearish structure break")
alertcondition(buySweep, "Buy-side sweep", "Potential buy-side liquidity sweep")
alertcondition(sellSweep, "Sell-side sweep", "Potential sell-side liquidity sweep")
Data limitation: TradingView's public embed chart is a display widget and does not expose its OHLC series to this WordPress page. Historical analysis therefore uses TradingView-exported CSV. Live analysis uses user-configured TradingView alert webhooks. The Advanced Charts library also requires a separate data source/datafeed; it does not include market data itself.
Educational tool only. BOS, MSS, liquidity, FVG and order-block definitions are configurable interpretations. The rule engine does not predict returns, verify every discretionary ICT concept, or place trades. Test results on historical data and paper trade before considering real capital.

Educational use only. ICT structure, liquidity, FVG and order-block rules are interpretations that require manual validation. No broker execution or automatic trade placement is connected.