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 de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal