FOREXCOM:USDCAD   Dollar Américain / Dollar Canadien
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)
Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.