something i created if anyone can improve it or change for better visual
![]()
//@version=5
strategy("Simple ICT Sweep + FVG (LuxAlgo Swings FIXED)", overlay=true, pyramiding=0)
//======================================================================
// 1) SIMPLIFIED LUXALGO LIQUIDITY SWINGS (STRATEGY-SAFE)
//======================================================================
// Settings
liqLen = input.int(14, "Liquidity Swing Lookback")
area = input.string("Wick Extremity", "Swing Area", options=["Wick Extremity", "Full Range"])
// Pivot High / Low
ph = ta.pivothigh(high, liqLen, liqLen)
pl = ta.pivotlow(low, liqLen, liqLen)
// Persistent zones
var float ph_top = na
var float ph_btm = na
var float pl_top = na
var float pl_btm = na
// Update swing HIGH zone
if not na(ph)
ph_top := high[liqLen]
ph_btm := area == "Wick Extremity" ? math.max(open[liqLen], close[liqLen]) : low[liqLen]
// Update swing LOW zone
if not na(pl)
pl_btm := low[liqLen]
pl_top := area == "Wick Extremity" ? math.min(open[liqLen], close[liqLen]) : high[liqLen]
// Plot zones (simple & safe)
plot(ph_top, "Liquidity High", color=color.red, linewidth=2, style=plot.style_linebr)
plot(ph_btm, "Liquidity High Base", color=color.new(color.red, 60), style=plot.style_linebr)
plot(pl_top, "Liquidity Low Base", color=color.new(color.teal, 60), style=plot.style_linebr)
plot(pl_btm, "Liquidity Low", color=color.teal, linewidth=2, style=plot.style_linebr)
//======================================================================
// 2) SIMPLE ICT ENTRY MODEL
//======================================================================
// Sweep + close back inside (CONFIRMATION)
bullSweepConfirm = not na(pl_btm) and low < pl_btm and close > pl_top
bearSweepConfirm = not na(ph_top) and high > ph_top and close < ph_btm
// Fair Value Gap
bullFVG = low > high[2] // zone: high[2] → low
bearFVG = high < low[2] // zone: high → low[2]
// State
var int dir = 0
var bool haveFVG = false
var float fvgTop = na
var float fvgBot = na
// Arm direction
if bullSweepConfirm
dir := 1
haveFVG := false
if bearSweepConfirm
dir := -1
haveFVG := false
// Capture FIRST FVG
if dir == 1 and not haveFVG and bullFVG
fvgBot := high[2]
fvgTop := low
haveFVG := true
if dir == -1 and not haveFVG and bearFVG
fvgTop := low[2]
fvgBot := high
haveFVG := true
// Entry = first mitigation
touchFVG = haveFVG and low <= fvgTop and high >= fvgBot
longEntry = dir == 1 and touchFVG
shortEntry = dir == -1 and touchFVG
// Execute
if longEntry
strategy.entry("LONG", strategy.long)
dir := 0
haveFVG := false
if shortEntry
strategy.entry("SHORT", strategy.short)
dir := 0
haveFVG := false