OPEN-SOURCE SCRIPT

ICT & SMC Strategy

//version=5
strategy("ICT & SMC Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=5)

// إعدادات الهيكل السوقي
swingHigh = ta.highest(high, 5)
swingLow = ta.lowest(low, 5)

// تعريف كتل الأوامر - تعريف شمعة ذات زخم قوي
isBullishOrderBlock = (close > open) and (high - low > 1.5 * (close[1] - open[1]))
isBearishOrderBlock = (close < open) and (high - low > 1.5 * (open[1] - close[1]))

// مناطق السيولة (اعتمادًا على أعلى القمم وأدنى القيعان)
liquidityZoneHigh = ta.highest(high, 20)
liquidityZoneLow = ta.lowest(low, 20)

// إشارات الشراء والبيع بناءً على الهيكل السوقي وكتل الأوامر
longCondition = (ta.crossover(low, swingLow) or isBullishOrderBlock) and (close > liquidityZoneLow)
shortCondition = (ta.crossunder(high, swingHigh) or isBearishOrderBlock) and (close < liquidityZoneHigh)

// تنفيذ الأوامر
if (longCondition)
strategy.entry("Buy", strategy.long)
if (shortCondition)
strategy.entry("Sell", strategy.short)

// عرض مناطق السيولة وكتل الأوامر على الرسم البياني
plot(liquidityZoneHigh, color=color.red, linewidth=1, title="Liquidity Zone High")
plot(liquidityZoneLow, color=color.green, linewidth=1, title="Liquidity Zone Low")

bgcolor(isBullishOrderBlock ? color.new(color.green, 80) : na, title="Bullish Order Block")
bgcolor(isBearishOrderBlock ? color.new(color.red, 80) : na, title="Bearish Order Block")
Cycles

Script open-source

In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?

Declinazione di responsabilità