シーガル指標に基づく暗号通貨トレンドフォロー戦略


作成日: 2024-01-19 17:40:52 最終変更日: 2024-01-19 17:40:52
コピー: 0 クリック数: 679
1
フォロー
1617
フォロワー

シーガル指標に基づく暗号通貨トレンドフォロー戦略

概要

この戦略は,海指数に基づく暗号通貨のトレンド追跡戦略である.これは,2つの異なる周期の指数移動平均と海指数と組み合わせた複数の条件を使用して取引シグナルを生成する.この戦略は,中長線の価格トレンドを認識し,トレンドが転じるときに間に合うように入場することを目的としている.

戦略原則

この戦略は50周期と100周期のEMA平均線を使用する.同時に,海線を計算する.これは,市場騒音をフィルターする特殊な線である.この戦略は海線の開値,閉値,最高値と最低値を使用し,より正確な取引信号を発生させるために100周期のEMA線に適用する.

具体的には,100周期海線の開場価格が閉場価格より高く,上方のK線の開場価格が閉場価格より低ければ,多額のシグナルである.反対に,100周期海線の開場価格が閉場価格より低く,上方のK線の開場価格が閉場価格より高く,空のシグナルである.

この戦略は,二重EMAシステムと海指標を組み合わせて,中長線トレンドが形成される時に適切な機会を捉えることを目的としている.それは,海指標を使用して,短期市場のノイズをフィルターし,取引信号をより信頼性のあるものにします.

戦略的優位性

  • 海指数を使用すると,ノイズを効果的にフィルターし,取引信号をより明確かつ信頼性のあるものにします.
  • 多周期EMAと海指標は,強い中長線トレンドを識別する
  • 複数の条件を組み合わせることで 機会を逃さないことができます
  • この戦略は,特に高変動の仮想通貨市場に適しています.
  • 操作リスクを減らすために,多策で設定できます.

戦略リスク

  • ストップ・ロスの使用が過度に緩やかであるため,損失のリスクが高い状況
  • この戦略は,波動的な状況では,より多くの無効取引を生成する可能性があります.
  • 海指数は,価格の落とし込みが一定であり,リスクを完全に回避することはできません.
  • 市場が逆転し,損失が拡大するリスクがある.

リスクを軽減するために,適切なストップを縮小したり,他の指標と組み合わせてトレンドの逆転を判断することを考慮したりできます.市場が震動区間に入ると,この戦略を一時的に停止して新しいトレンドの発生を待つこともできます.

戦略最適化の方向性

この戦略は以下の方向から最適化できます.

  • EMAのパラメータを最適化して,最適なパラメータの組み合わせを見つける
  • KDJ,MACDなどの海指数に代わる指標を試す
  • 入場確認として価格の突破を増加させる
  • トレンドの逆転を判断する波動率の指標と組み合わせる
  • 機械学習による動的最適化パラメータ

要約する

海指数に基づく暗号通貨のトレンド追跡戦略は,トレンド判断,入場タイミング,ストップ損失制御の複数の側面を総合的に考慮し,暗号通貨のこのような高波動の品種に非常に適しています.この戦略は,海指数フィルターノイズを使用し,堅牢なリスク管理方法を採用し,中長線価格トレンドをもたらす取引機会を効果的に捉えることができます.この戦略のパフォーマンスは,パラメータ設定,指標選択およびリスク管理方法をさらに最適化すれば,大きく向上する余地があります.

ストラテジーソースコード
/*backtest
start: 2023-01-12 00:00:00
end: 2024-01-18 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
//@SoftKill21
strategy(title="CRYPTO HA Strategy", shorttitle="CRYPTO HA Strategy", overlay=true , default_qty_type =strategy.percent_of_equity, default_qty_value =100, commission_type= strategy.commission.percent,commission_value =0.1 )


ma1_len = input(50)
ma2_len = input(100)

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 = 2020, 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 = 2020, title = "To Year", minval = 1970)

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


//First Moving Average data
o = ema(open, ma1_len)
c = ema(close, ma1_len)
h = ema(high, ma1_len)
l = ema(low, ma1_len)

// === HA calculator ===
ha_t = heikinashi(syminfo.tickerid)
ha_o = security(ha_t, timeframe.period, o)
ha_c = security(ha_t, timeframe.period, c)
ha_h = security(ha_t, timeframe.period, h)
ha_l = security(ha_t, timeframe.period, l)

//Second Moving Average data

o2 = ema(ha_o, ma2_len)
c2 = ema(ha_c, ma2_len)
h2 = ema(ha_h, ma2_len)
l2 = ema(ha_l, ma2_len)

// === Color def ===
ha_col = o2 > c2 ? color.white : color.lime

sell = o2 > c2 and o2[1] < c2[1] and time_cond
buy = o2 < c2 and o2[1] > c2[1] and time_cond
plotshape(buy, color=color.green, text= "Buy", location= location.belowbar,style= shape.labelup, textcolor=color.white, size = size.tiny, title="Buy Alert",editable=false, transp=60)
plotshape(sell, color=color.red, text= "Sell", location= location.abovebar,style= shape.labeldown, textcolor=color.white, size = size.tiny, title="Sell Alert", editable=false, transp=60)

trendColor = buy ? color.red : sell ? color.green : na
plot( buy ? close: sell  ? close : na , color=trendColor, style=plot.style_line, linewidth=4, editable=false)



onlylong=input(true)
original=input(false)

if(onlylong)
    strategy.entry("long",1,when=buy)
    strategy.close("long",when=sell)
if(original)
    strategy.entry("long",1,when=buy)
    strategy.entry("short",0,when=sell)

sl = input(0.075)
strategy.exit("closelong", "long" , loss = close * sl / syminfo.mintick, alert_message = "sl point")
strategy.exit("closeshort", "short" , loss = close * sl / syminfo.mintick, alert_message = "sl point")