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에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.