ウェーブトレンド大型指数売られ過ぎリバウンドグリッド取引戦略

DCA EMA SMA
作成日: 2024-04-25 17:13:39 最終変更日: 2024-04-25 17:13:39
コピー: 3 クリック数: 898
1
フォロー
1617
フォロワー

ウェーブトレンド大型指数売られ過ぎリバウンドグリッド取引戦略

概要

この戦略は,Wavetrend指標に基づいて,複数の超売りと超買いレベルを設定し,価格がこれらのレベルに触れたときに多頭ポジションを確立し,価格が超買いレベルに反発したときに平仓で利益を得ます.これは,市場の超下反転の動きを捉えるための格子取引戦略であり,ビットコインやソラナなどのデジタル通貨の15分周期に適用されます.

戦略原則

  1. Wavetrendの2つの線を計算し,原値 ((wt1)) と平滑値 ((wt2)) を計算する.
  2. 複数の超売りレベル (oslevel1~8) と超買いレベル (Oblevel1~5) を設定する.
  3. wt1とwt2が同時に超売りレベルを下回り,wt1がwt2の上にあるとき,多頭ポジションを開く。レベルが低いほど,ポジション開くのがより激進的である。
  4. wt1とwt2が同時に超買いレベル1より高く,wt1がwt2の下にあるとき,70%の多頭ポジションを平らにする.
  5. ステップ3と4を繰り返して,グリッド取引システムを構築します.

戦略的優位性

  1. 超落の反発を捕捉する: 複数の超落のレベルを設定し,価格が急落した後にポジションを開き,反発の利潤を獲る.
  2. 倉庫を分量建設し,リスクを制御する:超売レベルに応じて倉庫を分量建設し,レベルが低いほど,倉庫の位置が重いほど,リスクをよりよく制御することができる.
  3. 自動ストップ: 価格が超買い領域に反発したときに,ほとんどのポジションを自動的にクリアし,利益をロックします.
  4. パラメータの柔軟性:超売りと超買のレベルは,市場の特徴と個人の好みに応じて調整され,異なる取引品種と周期に対応します.

戦略リスク

  1. 暴落の危険:価格が下がり続けば,過剰売り込みのシグナルが増加し,重仓が締め付けられる可能性がある.
  2. 震動市場リスク: 価格が超売り領域で繰り返し揺れ動くと,多発的な開設が起こり,取引を止められず,戦略の効果が低下する可能性があります.
  3. パラメータリスク:異なるパラメータ設定は,戦略のパフォーマンスに大きく影響し,反省と経験に基づいて最適化する必要があります.そうでなければ,損失をもたらす可能性があります.

戦略最適化の方向性

  1. トレンドフィルターを追加: ポジションを開く前に,大レベルのトレンドが上昇しているかどうかを判断し,下降傾向でポジションを開くのを避ける.
  2. ポジション管理の最適化: 価格が超売りレベルから離れているほど,ポジションの大きさを調整します.
  3. ダイナミックストップ:固定比率平仓ではなく,保有比率と損益比率に基づいて動的にストップレベルを調整する.
  4. 追加ストップ: 固定または追跡ストップを設定し,単一の取引の最大損失を制御します.

要約する

Wavetrend大指数超跌反彈網取引戦略は,超売り超買い信号に基づく量化戦略であり,順次ポジション構築と自動ストップの方法によって,超跌後の反弹情勢を捕捉し,差値の利益を得ようとする.この戦略の優点は,適応性が強く,パラメータを柔軟に調整できるというものである.しかし,市場が継続的に下落し,パラメータ設定が不適切であるなどのリスクも存在する.実際のアプリケーションでは,トレンドフィルター,ダイナミックポジション,ストップストップなどの損失最適化手段を加えることを考慮して,戦略の安定性と収益性を向上させることができる.しかし,依然として注意が必要である.この戦略は,リスクの高い戦略であり,厳格なポジションコントロールが必要であり,慎重に使用する必要があります.

ストラテジーソースコード
/*backtest
start: 2024-03-25 00:00:00
end: 2024-04-24 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
// © And Isaac, all rights reserved. If there is any piracy, please call the police immediately. 

strategy(title='wavetrend',shorttitle='DCA-High win rate quantitative trading')
n1 = input(40,'channel length')
n2 = input(60,'average length')
Oblevel1 = input(40,'over bought level 1')
Oblevel2 = input(50,'over bought level 1')
Oblevel3 = input(70,'over bought level 1')
Oblevel4 = input(80,'over bought level 1')
Oblevel5 = input(100,'over bought level 2')
oslevel1 = input(-40,'over sold level 1')
oslevel2 = input(-45,'over sold level 1')
oslevel3 = input(-50,'over sold level 1')
oslevel4 = input(-55,'over sold level 1')
oslevel5 = input(-65,'over sold level 1')
oslevel6 = input(-75,'over sold level 1')
oslevel7 = input(-85,'over sold level 1')
oslevel8 = input(-100,'over sold level 2')

ap = input(title="source",defval=hlc3)
esa =ta.ema(ap, n1)
d =ta.ema(math.abs(ap - esa),n1)
ci = (ap - esa)/ (0.015 * d)
tci = ta.ema(ci,n2)

wt1 = tci
wt2 = ta.sma(wt1, 4)

plot(0,color=color.new(#787b86, 0 ))
plot(Oblevel1, color=color.new(#89ff52, 53), linewidth = 2)
plot(oslevel1, color=color.new(#89ff52, 53), linewidth = 2)
plot(oslevel2, color=color.new(#89ff52, 53), linewidth = 2)
plot(oslevel3, color=color.new(#89ff52, 53), linewidth = 2)
plot(oslevel4, color=color.new(#89ff52, 53), linewidth = 2)
plot(oslevel5, color=color.new(#89ff52, 53), linewidth = 2)
plot(oslevel6, color=color.new(#89ff52, 53), linewidth = 2)
plot(oslevel7, color=color.new(#89ff52, 53), linewidth = 2)
plot(oslevel8, color=color.new(#89ff52, 53), linewidth = 2)
plot(oslevel2, color=color.new(#89ff52, 53), linewidth = 2)
plot(wt1, color=color.new(#ff5252,0))
plot(wt2, color=color.new(#ffffff,0))
plot(wt1 - wt2, color=color.new(#00bcd4, 30),style=plot.style_area)

plot(ta.cross(wt1, wt2) ? wt2 : na, color=color.new(#ff5252,0) , style=plot.style_circles, linewidth=4 )

// barcolor(cross(wt1, wt2) ? (wt2 - wt1 > 0 ? aqua : yellow) : na)
barcolor(ta.cross(wt1, wt2) ? (wt2 - wt1 > 0 ? color.new(#ffffff,0) : color.new(#89ff52, 53)) : na)

/////////////
Long1 = wt2 < oslevel1 and wt1 < oslevel1 and wt1>wt2 and wt2 > oslevel3 and wt1>oslevel3
Long5 = wt2 < oslevel5 and wt1 < oslevel5 and wt1>wt2 and wt2 > oslevel6 and wt1>oslevel6

Long7 = wt2 < oslevel7 and wt1 < oslevel7 and wt1>wt2 and wt2 > oslevel8 and wt1>oslevel8
Long8 = wt2 < oslevel8 and wt1 < oslevel8 and wt1>wt2
LS1 = wt2 > Oblevel1 and wt1 > Oblevel1 and wt1<wt2



if Long1
    strategy.entry("L",strategy.long,comment = "做多1")


if Long5
    strategy.entry("L",strategy.long,comment = "做5")

if Long7
    strategy.entry("L",strategy.long,comment = "做多7")
if Long8
    strategy.entry("L",strategy.long,comment = "做多8")
if LS1
    strategy.close("L", qty_percent = 70,comment = "平多")