この戦略は,均線システム,RSI指標,Stoch指標などの複数の技術指標を組み合わせて使用し,価格の傾向と超買い超売り状態を判断し,取引信号を形成します.この戦略は,複数の指標の優位性を集約し,より安定で信頼できる取引決定を目指します.
戦略の原則:
複数の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")