OPEN-SOURCE SCRIPT
🔥 Smart Money Entry Bot (ICT Style)

//version=5
indicator("🔥 Smart Money Entry Bot (ICT Style)", overlay=true)
// === INPUTS ===
liqLookback = input.int(15, title="Liquidity Lookback Period")
useEngulfing = input.bool(true, title="Use Engulfing Candle Confirmation")
useFVG = input.bool(false, title="Use FVG Confirmation (Experimental)")
sessionFilter = input.bool(true, title="Only Trade During London & NY Sessions")
stopLossPerc = input.float(0.5, title="Stop Loss (%)", step=0.1)
takeProfitPerc = input.float(1.5, title="Take Profit (%)", step=0.1)
// === TIME FILTER ===
inSession = not sessionFilter or (time(timeframe.period, "0930-1130") or time(timeframe.period, "0300-0600"))
// === LIQUIDITY SWEEP ===
highestHigh = ta.highest(high, liqLookback)
lowestLow = ta.lowest(low, liqLookback)
sweptHigh = high > highestHigh[1]
sweptLow = low < lowestLow[1]
// === ENGULFING ===
bullishEngulfing = close > open and open < close[1] and close > open[1]
bearishEngulfing = close < open and open > close[1] and close < open[1]
// === BOS Logic (Mock: strong move in opposite direction after sweep) ===
bosDown = sweptHigh and close < close[1]
bosUp = sweptLow and close > close[1]
// === Fair Value Gap (Experimental) ===
fvgBull = low > high[2] and low[1] > high[2]
fvgBear = high < low[2] and high[1] < low[2]
// === ENTRY CONDITIONS ===
longEntry = sweptLow and bosUp and inSession and (not useEngulfing or bullishEngulfing) and (not useFVG or fvgBull)
shortEntry = sweptHigh and bosDown and inSession and (not useEngulfing or bearishEngulfing) and (not useFVG or fvgBear)
// === PLOT SIGNALS ===
plotshape(longEntry, location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(shortEntry, location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// === ALERTS ===
alertcondition(longEntry, title="BUY Signal", message="BUY signal confirmed by Smart Money Bot")
alertcondition(shortEntry, title="SELL Signal", message="SELL signal confirmed by Smart Money Bot")
// === STOP LOSS / TAKE PROFIT LEVELS (Visual) ===
slLong = longEntry ? close * (1 - stopLossPerc / 100) : na
tpLong = longEntry ? close * (1 + takeProfitPerc / 100) : na
slShort = shortEntry ? close * (1 + stopLossPerc / 100) : na
tpShort = shortEntry ? close * (1 - takeProfitPerc / 100) : na
plot(slLong, color=color.red, style=plot.style_linebr, title="SL Long")
plot(tpLong, color=color.green, style=plot.style_linebr, title="TP Long")
plot(slShort, color=color.red, style=plot.style_linebr, title="SL Short")
plot(tpShort, color=color.green, style=plot.style_linebr, title="TP Short")
indicator("🔥 Smart Money Entry Bot (ICT Style)", overlay=true)
// === INPUTS ===
liqLookback = input.int(15, title="Liquidity Lookback Period")
useEngulfing = input.bool(true, title="Use Engulfing Candle Confirmation")
useFVG = input.bool(false, title="Use FVG Confirmation (Experimental)")
sessionFilter = input.bool(true, title="Only Trade During London & NY Sessions")
stopLossPerc = input.float(0.5, title="Stop Loss (%)", step=0.1)
takeProfitPerc = input.float(1.5, title="Take Profit (%)", step=0.1)
// === TIME FILTER ===
inSession = not sessionFilter or (time(timeframe.period, "0930-1130") or time(timeframe.period, "0300-0600"))
// === LIQUIDITY SWEEP ===
highestHigh = ta.highest(high, liqLookback)
lowestLow = ta.lowest(low, liqLookback)
sweptHigh = high > highestHigh[1]
sweptLow = low < lowestLow[1]
// === ENGULFING ===
bullishEngulfing = close > open and open < close[1] and close > open[1]
bearishEngulfing = close < open and open > close[1] and close < open[1]
// === BOS Logic (Mock: strong move in opposite direction after sweep) ===
bosDown = sweptHigh and close < close[1]
bosUp = sweptLow and close > close[1]
// === Fair Value Gap (Experimental) ===
fvgBull = low > high[2] and low[1] > high[2]
fvgBear = high < low[2] and high[1] < low[2]
// === ENTRY CONDITIONS ===
longEntry = sweptLow and bosUp and inSession and (not useEngulfing or bullishEngulfing) and (not useFVG or fvgBull)
shortEntry = sweptHigh and bosDown and inSession and (not useEngulfing or bearishEngulfing) and (not useFVG or fvgBear)
// === PLOT SIGNALS ===
plotshape(longEntry, location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(shortEntry, location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// === ALERTS ===
alertcondition(longEntry, title="BUY Signal", message="BUY signal confirmed by Smart Money Bot")
alertcondition(shortEntry, title="SELL Signal", message="SELL signal confirmed by Smart Money Bot")
// === STOP LOSS / TAKE PROFIT LEVELS (Visual) ===
slLong = longEntry ? close * (1 - stopLossPerc / 100) : na
tpLong = longEntry ? close * (1 + takeProfitPerc / 100) : na
slShort = shortEntry ? close * (1 + stopLossPerc / 100) : na
tpShort = shortEntry ? close * (1 - takeProfitPerc / 100) : na
plot(slLong, color=color.red, style=plot.style_linebr, title="SL Long")
plot(tpLong, color=color.green, style=plot.style_linebr, title="TP Long")
plot(slShort, color=color.red, style=plot.style_linebr, title="SL Short")
plot(tpShort, color=color.green, style=plot.style_linebr, title="TP Short")
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità . Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilitÃ
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità . Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilitÃ
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.