OPEN-SOURCE SCRIPT
SMC Smart Money Concepts

//version=5
indicator("SMC Smart Money Concepts", overlay=true)
// === إعداد الهيكل السعري ===
// تحديد HH, HL, LL, LH
pivotHigh = ta.pivothigh(high, 5, 5)
pivotLow = ta.pivotlow(low, 5, 5)
plotshape(pivotHigh, location=location.abovebar, style=shape.triangleup, color=color.red, title="Lower High")
plotshape(pivotLow, location=location.belowbar, style=shape.triangledown, color=color.green, title="Higher Low")
// === Break of Structure & CHoCH ===
bos = pivotHigh and close > high[6]
choch = pivotLow and close < low[6]
plotshape(bos, location=location.abovebar, color=color.blue, style=shape.labelup, text="BOS")
plotshape(choch, location=location.belowbar, color=color.orange, style=shape.labeldown, text="CHOCH")
// === Order Blocks (OB) ===
// نأخذ آخر شمعة صاعدة قبل هبوط قوي كمثال على OB
bearishOB = high[1] < high[2] and close[1] < open[1]
bullishOB = low[1] > low[2] and close[1] > open[1]
plotshape(bearishOB, location=location.abovebar, color=color.maroon, style=shape.square, title="Bearish OB")
plotshape(bullishOB, location=location.belowbar, color=color.lime, style=shape.square, title="Bullish OB")
// === Fair Value Gap (FVG) ===
// إذا لم تلامس الشمعة التالية قاع أو قمة شمعتين قبليتين
fvgBull = low > high[2]
fvgBear = high < low[2]
plotshape(fvgBull, location=location.belowbar, color=color.teal, style=shape.circle, title="Bullish FVG")
plotshape(fvgBear, location=location.abovebar, color=color.fuchsia, style=shape.circle, title="Bearish FVG")
// === السيولة (Liquidity Pools) ===
// تعتبر السيولة موجودة عند قمم أو قيعان واضحة
liquidityHigh = high == ta.highest(high, 20)
liquidityLow = low == ta.lowest(low, 20)
plotshape(liquidityHigh, location=location.abovebar, color=color.purple, style=shape.cross, title="Liquidity High")
plotshape(liquidityLow, location=location.belowbar, color=color.purple, style=shape.cross, title="Liquidity Low")
indicator("SMC Smart Money Concepts", overlay=true)
// === إعداد الهيكل السعري ===
// تحديد HH, HL, LL, LH
pivotHigh = ta.pivothigh(high, 5, 5)
pivotLow = ta.pivotlow(low, 5, 5)
plotshape(pivotHigh, location=location.abovebar, style=shape.triangleup, color=color.red, title="Lower High")
plotshape(pivotLow, location=location.belowbar, style=shape.triangledown, color=color.green, title="Higher Low")
// === Break of Structure & CHoCH ===
bos = pivotHigh and close > high[6]
choch = pivotLow and close < low[6]
plotshape(bos, location=location.abovebar, color=color.blue, style=shape.labelup, text="BOS")
plotshape(choch, location=location.belowbar, color=color.orange, style=shape.labeldown, text="CHOCH")
// === Order Blocks (OB) ===
// نأخذ آخر شمعة صاعدة قبل هبوط قوي كمثال على OB
bearishOB = high[1] < high[2] and close[1] < open[1]
bullishOB = low[1] > low[2] and close[1] > open[1]
plotshape(bearishOB, location=location.abovebar, color=color.maroon, style=shape.square, title="Bearish OB")
plotshape(bullishOB, location=location.belowbar, color=color.lime, style=shape.square, title="Bullish OB")
// === Fair Value Gap (FVG) ===
// إذا لم تلامس الشمعة التالية قاع أو قمة شمعتين قبليتين
fvgBull = low > high[2]
fvgBear = high < low[2]
plotshape(fvgBull, location=location.belowbar, color=color.teal, style=shape.circle, title="Bullish FVG")
plotshape(fvgBear, location=location.abovebar, color=color.fuchsia, style=shape.circle, title="Bearish FVG")
// === السيولة (Liquidity Pools) ===
// تعتبر السيولة موجودة عند قمم أو قيعان واضحة
liquidityHigh = high == ta.highest(high, 20)
liquidityLow = low == ta.lowest(low, 20)
plotshape(liquidityHigh, location=location.abovebar, color=color.purple, style=shape.cross, title="Liquidity High")
plotshape(liquidityLow, location=location.belowbar, color=color.purple, style=shape.cross, title="Liquidity Low")
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.