FOREXCOM:USDCAD   دولار أمريكي / دولار كندي
strategy(“ChatGPT Strategy by Trade with Pat”, overlay=true)
// Inputs
fastLength = input(12, minval=1)
slowLength = input(26, minval=1)
signalLength = input(9, minval=1)
// Compute MACD
macd = ema(close, fastLength) – ema(close, slowLength)
signal = sma(macd, signalLength)
// Plot MACD and signal line
plot(macd, color=color.blue, linewidth=1)
plot(signal, color=color.orange, linewidth=1)
// Buy/Sell Signals
buy = crossover(macd, signal)
sell = crossunder(macd, signal)
// Plot Buy/Sell Signals
plotshape(buy, color=color.green, style=shape.triangleup, location=location.belowbar)
plotshape(sell, color=color.red, style=shape.triangledown, location=location.abovebar)
إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.