Pine Script (TradingView)
هذا مثال استراتيجية Pine Script على TradingView لمفهوم هذه الصفحة. الصقه في Pine Editor داخل TradingView، اضفه الى الرسم البياني، ثم شغله في Strategy Tester.
//@version=6
strategy("Smart Money Concepts (SMC)", overlay=true)
emaFast = ta.ema(close, 20)
emaSlow = ta.ema(close, 50)
bullStructure = close > emaFast and emaFast > emaSlow
bearStructure = close < emaFast and emaFast < emaSlow
liquidityGrab = low < ta.lowest(low, 10)[1] and close > open
longSignal = bullStructure and liquidityGrab
exitSignal = bearStructure
if longSignal
strategy.entry("Long", strategy.long)
if exitSignal
strategy.close("Long")
plot(emaFast, "Fast", color=color.aqua)
plot(emaSlow, "Slow", color=color.orange)