이 전략은 평평선 시스템, RSI 지표 및 스토크 지표와 같은 여러 가지 기술 지표를 조합하여 가격 추세와 과매매 과매매 상태를 판단하여 거래 신호를 형성합니다. 이 전략은 더 안정적이고 신뢰할 수있는 거래 결정을 위해 여러 지표의 장점을 통합합니다.
전략적 원칙:
다중 EMA 평균선을 계산하여 가격의 중장선 경향을 판단한다.
RSI와 Stoch 지표를 계산하여 과매매 또는 과매매 상태인지 판단하십시오.
평균선 시스템이 다중 신호를 발산할 때, RSI가 초과하지 않았거나, Stoch가 초과하지 않았다면, 다중 동작을 수행한다.
평균선 시스템이 하위 신호를 발산하고, RSI가 초과되지 않고, Stoch가 초과되지 않을 때, 하위 동작을 수행한다.
어떤 지표가 역전 신호를 발산할 때, 평점 연산을 한다.
이 전략의 장점:
다중 지표 포트폴리오 검증으로 잘못된 거래의 가능성을 줄일 수 있다.
지표들은 서로 보완적으로 작용하여 시장에 대한 판단을 향상시킵니다.
명확한 거래 규칙, 재검토 및 실판을 위한 것.
이 전략의 위험은:
지표의 반복성을 신중하게 평가하여 과잉 과잉을 피하십시오.
다중 지표 조합 최적화 매개 변수는 더 복잡하다.
지표를 늘리는 것이 전략의 효과를 늘리는 것은 아닙니다.
결론적으로, 이 다중 지표 조합 전략은 어느 정도 의사결정 효과를 높일 수 있지만, 최적화 난이도와 지표 중복 문제를 주의해야 하며, 전략을 단순하고 신뢰할 수 있게 유지해야 한다.
/*backtest
start: 2022-09-06 00:00:00
end: 2023-09-12 00:00:00
period: 3d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
// strategy(title='Combined Strategy', default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=.0020, pyramiding=0, slippage=3, overlay=true)
//----------//
// MOMENTUM //
//----------//
ema8 = ta.ema(close, 5)
ema13 = ta.ema(close, 9)
ema21 = ta.ema(close, 13)
ema34 = ta.ema(close, 21)
ema55 = ta.ema(close, 34)
plot(ema8, color=color.new(color.red, 0), style=plot.style_line, title='5', linewidth=1)
plot(ema13, color=color.new(color.orange, 0), style=plot.style_line, title='9', linewidth=1)
plot(ema21, color=color.new(color.yellow, 0), style=plot.style_line, title='13', linewidth=1)
plot(ema34, color=color.new(color.aqua, 0), style=plot.style_line, title='21', linewidth=1)
plot(ema55, color=color.new(color.lime, 0), style=plot.style_line, title='34', linewidth=1)
longEmaCondition = ema8 > ema13 and ema13 > ema21 and ema21 > ema34 and ema34 > ema55
exitLongEmaCondition = ema13 < ema55
shortEmaCondition = ema8 < ema13 and ema13 < ema21 and ema21 < ema34 and ema34 < ema55
exitShortEmaCondition = ema13 > ema55
// ---------- //
// OSCILLATORS //
// ----------- //
rsi = ta.rsi(close, 14)
longRsiCondition = rsi < 70 and rsi > 40
exitLongRsiCondition = rsi > 70
shortRsiCondition = rsi > 30 and rsi < 60
exitShortRsiCondition = rsi < 30
Stochastic
length = 14, smoothK = 3, smoothD = 3
kFast = ta.stoch(close, high, low, 14)
dSlow = ta.sma(kFast, smoothD)
longStochasticCondition = kFast < 80
exitLongStochasticCondition = kFast > 95
shortStochasticCondition = kFast > 20
exitShortStochasticCondition = kFast < 5
//----------//
// STRATEGY //
//----------//
longCondition = longEmaCondition and longRsiCondition and longStochasticCondition and strategy.position_size == 0
exitLongCondition = (exitLongEmaCondition or exitLongRsiCondition or exitLongStochasticCondition) and strategy.position_size > 0
if (longCondition)
strategy.entry("LONG", strategy.long)
if (exitLongCondition)
strategy.close("LONG")
shortCondition = shortEmaCondition and shortRsiCondition and shortStochasticCondition and strategy.position_size == 0
exitShortCondition = (exitShortEmaCondition or exitShortRsiCondition or exitShortStochasticCondition) and strategy.position_size < 0
if (shortCondition)
strategy.entry("SHORT", strategy.short)
if (exitShortCondition)
strategy.close("SHORT")