
이 전략은 양평선 교차와 상대적으로 약한 지표 ((RSI) 를 결합한 거래 시스템입니다. 이 전략은 9주기 및 21주기 지수 이동 평균 ((EMA) 를 주요 신호 생성 도구로 사용하며 RSI 지표를 필터로 도입하여 과도한 구매 / 판매 영역에서 거래하는 것을 피합니다.
전략의 핵심 논리는 다음과 같은 핵심 구성 요소를 기반으로 합니다.
이 전략은 고전적인 기술적 분석 도구를 결합하여 보다 완전한 거래 시스템을 구축한다. 동선 교차로 트렌드를 캡처하고 RSI로 신호 필터링을 수행하여 트렌드 추적과 동력 확인의 유기적 결합을 구현한다. 전략의 주요 장점은 신뢰성과 위험 제어 능력이지만 이동 평균의 지연성과 파라미터 설정의 민감성에 주의를 기울여야 한다. 제안된 최적화 방향에 의해 전략에는 더 많은 개선의 여지가 있다.
/*backtest
start: 2025-01-01 00:00:00
end: 2025-02-19 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © McTunT
// Gold Price Trading Signals
// Pine Script version 6 code for TradingView
//@version=6
strategy("Ausiris Gold Trading Strategy", overlay=true)
// Input parameters
fastLength = input.int(9, title="Fast MA Length", minval=1)
slowLength = input.int(21, title="Slow MA Length", minval=1)
rsiLength = input.int(14, title="RSI Length", minval=1)
rsiOverbought = input.int(70, title="RSI Overbought Level", minval=50, maxval=100)
rsiOversold = input.int(30, title="RSI Oversold Level", minval=0, maxval=50)
// Calculate moving averages
fastMA = ta.ema(close, fastLength)
slowMA = ta.ema(close, slowLength)
// Calculate RSI
rsiValue = ta.rsi(close, rsiLength)
// Plot moving averages
plot(fastMA, color=color.blue, title="Fast MA")
plot(slowMA, color=color.red, title="Slow MA")
// Generate signals
longCondition = ta.crossover(fastMA, slowMA) and rsiValue < rsiOverbought
shortCondition = ta.crossunder(fastMA, slowMA) and rsiValue > rsiOversold
// Plot buy/sell signals
plotshape(longCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(shortCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
// Strategy entry/exit
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
// Add alert conditions
alertcondition(longCondition, title="Buy Alert", message="Gold Buy Signal!")
alertcondition(shortCondition, title="Sell Alert", message="Gold Sell Signal!")
// Display RSI values
hline(rsiOverbought, "Overbought", color=color.red)
hline(rsiOversold, "Oversold", color=color.green)
plot(rsiValue, "RSI", color=color.purple, display=display.none)