複数のモメンタム指標を組み合わせた仮想通貨取引戦略

作者: リン・ハーンチャオチャン開催日:2023年9月13日 15:16:55
タグ:

この戦略は"複数のモメンタム指標を組み合わせる仮想通貨取引戦略"と呼ばれる.取引シグナルのために仮想通貨の過剰購入および過剰販売状況を測定するために,MFI,RSIおよびストックRSIインジケーターを統合する.

MFI指標は,マネーフロー指数である.購入・販売圧力の強さを判断するために,量と価格の情報の両方を考慮する.20未満のMFIは過売状態を示唆し,80以上のMFIは過買い状態である.

RSI指標は,相対強度指標である.価格の過買いと過売りのレベルを表現する.RSIが30未満は過売り,70を超えるのは過買いである.

ストックRSIインジケーターは,RSIが過剰購入または過剰販売されているかどうかを判断するRSI変数である. 20-80に設定されたパラメータは過剰購入および過剰販売ゾーンを表します.

取引の論理は

MFI,RSI,ストークのRSIが同時に過売り値を下回ると,多重の過売り確認が表示されます.

3つの指標が合計して 過買い領域を超えると 短売りの多重過買い確認が表示されます

この戦略の利点は,複数の指標の確認が偽信号をフィルタリングし,入力精度を向上させることです. しかし,パラメータは完全に最適化され,リスクを制御するためにストップ・ロスは必要です.

結論として,モメント指標は仮想通貨価格変動に敏感であり,複数の指標を組み合わせることで戦略の安定性が向上する.それでも,トレーダーは市場の構造の変化に注意し,戦略調整に柔軟性を維持する必要があります.


/*backtest
start: 2023-08-13 00:00:00
end: 2023-09-12 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// Crypto Crew strategy entry signal long/short with stop loss. Exit signal not provided.
//
// Indicators: MFI + RSI + STOCH RSI
// Entry criteria: long when the three are oversold, short when the three indicators are overbought.
// Exit criteria: Take profit at Fib levels (not demonstrated here) measured from prevous highs/low.
// Feel free to contribute

//@version=4
strategy("Crypto Crew")

//inputs
source = hlc3
rsi_length = input(14, minval=1)
mfi_lenght =  input(14, minval=1)
smoothK = input(3, minval=1)
smoothD = input(3, minval=1)
lengthRSI = input(14, minval=1)
lengthStoch = input(14, minval=1)
okay = "Okay"
good = "Good"
veryGood = "Very good"
tradingOpportunity = input(title="Opportunity Type", defval=veryGood, options=[okay, good, veryGood])
longThreshhold = tradingOpportunity==okay? 40 : tradingOpportunity==good ? 30 : tradingOpportunity==veryGood? 20 : 0
shortThreshhold = tradingOpportunity==okay? 60 : tradingOpportunity==good ? 70 : tradingOpportunity==veryGood? 80 : 0

//lines
mfi = mfi(source, mfi_lenght)
rsi = rsi(source, rsi_length)
rsi1 = rsi(close, lengthRSI)
k = sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = sma(k, smoothD)

longSignal = mfi<longThreshhold and rsi<longThreshhold and k<longThreshhold and d<longThreshhold? 1:-1
shortSignal = mfi>shortThreshhold and rsi>shortThreshhold and k>shortThreshhold and d>shortThreshhold? 1:-1

if longSignal > 0
    strategy.entry("Long", strategy.long)
    strategy.exit(id="Long Stop Loss", stop=close*0.8) //20% stop loss 
    
if shortSignal > 0
    strategy.entry("Short", strategy.short, stop=close*1.2)
    strategy.exit(id="Short Stop Loss", stop=close*1.2) //20% stop loss

plot(k, color=color.blue)
plot(d, color=color.red)
plot(rsi, color=color.yellow)
plot(mfi, color=color.blue)
hline(longThreshhold, color=color.gray, linestyle=hline.style_dashed)
hline(shortThreshhold, color=color.gray, linestyle=hline.style_dashed)


もっと