RSI上昇による暗号通貨トレンド戦略


作成日: 2023-10-17 17:08:31 最終変更日: 2023-10-17 17:08:31
コピー: 0 クリック数: 629
1
フォロー
1617
フォロワー

RSI上昇による暗号通貨トレンド戦略

概要

RSI上昇の暗号トレンド戦略は,より長い時間周期 (例えば4時間以上) に適用される暗号通貨と株式市場のトレンド戦略である.

この戦略は,RSI指標の上昇と下降のトレンドを識別し,ブリン帯と変動率指標を組み合わせて,取引の整合を回避する.テストによると,この戦略は,法定通貨との取引よりも,暗号通貨対暗号通貨の取引でうまく機能している.

戦略原則

この戦略は以下の指標を用いています.

  • RSI - トレンドの上昇と低下を識別する
  • ブリン帯 - 状況の整理
  • 変化率 - トレンドの方向性

取引の具体的ルールは以下の通りです.

ポジション開設のルール

多頭ポジション開設:RSI値が上昇し,ブリン帯と変動率の指標が整合していないことを示し,多頭 空頭開設:RSI値が下がり,ブリン帯と変動率指標が整合していないことを示し,空白

平仓ルール

逆転信号が来たとき,平仓した.

優位分析

  • RSIはトレンドの方向を把握し,トレンドの転換点を把握します.
  • ブリン帯の認識と整合を組み合わせて,トレンドを逃したり,閉じ込められることも避けましょう.
  • 変動率指標はトレンドの方向を補強し,取引信号を信頼性のあるものにする
  • 長期サイクル取引に適し,利益をもたらす
  • 仮想通貨対仮想通貨取引に適し,法定通貨の為替リスクを避ける

リスク分析

  • この戦略は,止損ルールがないので,リスクが高い.
  • ブリン帯と変化率のパラメータの不適切な設定は,見逃したチャンスや間違った信号を引き起こす可能性があります.
  • 単に技術指標に頼るだけでは,大規模なブラック・スウェン事件に対応できません.

ストップを拡大し,ブリン帯と変動率のパラメータの組み合わせを調整し,基本的分析と組み合わせる.

最適化の方向

この戦略は,以下の点でさらに最適化できます.

  1. 損失防止機構を増やし,合理的な損失防止幅を設定し,単一損失を制御する.

  2. ブリン帯と変化率指標のパラメータを最適化し,最適なパラメータの組み合わせを見つけます.

  3. MACD,KDなどの他の補助指標を追加して,複数の指標の組み合わせを実現し,信号の正確性を向上させる.

  4. 取引を停止し,不規則な波動を回避するために,断流モデルを開発する.

  5. 機械学習の方法を使用して,パラメータの組み合わせと信号重量を自動的に最適化します.

  6. チェーン上のデータを組み合わせて,取引所の流動性,資金流動などのパラメータを重視し,戦略の適応性を向上させる.

要約する

RSIの上昇暗号トレンド戦略は,ブリン帯と変化率指標を併用してRSI指標を使用し,より長い時間周期で暗号通貨市場トレンドの捉え方を実現する.この戦略の優点は,トレンドの転換を間に合うように捉え,被套を回避し,より長い線を追跡するのに適した方向性の機会である.しかし,この戦略には,無止損性,パラメータ過度依存などの問題もあります.将来,止損性,パラメータ最適化,複数の指標の組み合わせ,機械学習などの方法によって改善され,戦略をより安定して信頼性のあるものにすることができます.

ストラテジーソースコード
/*backtest
start: 2023-09-16 00:00:00
end: 2023-10-16 00:00:00
period: 2h
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/
// © exlux99

//@version=4
strategy(title = "RSI Rising", overlay = true, initial_capital = 100, default_qty_type= strategy.percent_of_equity, default_qty_value = 100, slippage=0,commission_type=strategy.commission.percent,commission_value=0.03)

/////////////////////
source          = close
bb_length       = 20
bb_mult         = 1.0
basis           = sma(source, bb_length)
dev             = bb_mult * stdev(source, bb_length)
upperx           = basis + dev
lowerx           = basis - dev
bbr             = (source - lowerx)/(upperx - lowerx)
bbr_len         = 21
bbr_std         = stdev(bbr, bbr_len)
bbr_std_thresh  = 0.1
is_sideways     = (bbr > 0.0 and bbr < 1.0) and bbr_std <= bbr_std_thresh


////////////////
fromDay = input(defval = 1, title = "From Day", minval = 1, maxval = 31)
fromMonth = input(defval = 1, title = "From Month", minval = 1, maxval = 12)
fromYear = input(defval = 2010, title = "From Year", minval = 1970)
 //monday and session 
// To Date Inputs
toDay = input(defval = 31, title = "To Day", minval = 1, maxval = 31)
toMonth = input(defval = 12, title = "To Month", minval = 1, maxval = 12)
toYear = input(defval = 2021, title = "To Year", minval = 1970)

startDate = timestamp(fromYear, fromMonth, fromDay, 00, 00)
finishDate = timestamp(toYear, toMonth, toDay, 00, 00)
time_cond = true


sourcex = close
length = 2
pcntChange = 1

roc = 100 * (sourcex - sourcex[length])/sourcex[length]
emaroc = ema(roc, length/2)
isMoving() => emaroc > (pcntChange / 2) or emaroc < (0 - (pcntChange / 2))


periods = input(19)
smooth = input(14, title="RSI Length" )
src = input(low, title="Source" )


rsiClose = rsi(ema(src, periods), smooth)
long=rising(rsiClose,2) and not is_sideways and isMoving()
short=not rising(rsiClose,2) and not is_sideways and isMoving()


if(time_cond)
    strategy.entry('long',1,when=long)
    strategy.entry('short',0,when=short)