トリプル インディケーター クラウド パターンに基づく 傾向 フォロー 戦略

作者: リン・ハーンチャオチャン, 日付: 2023-09-13 17:38:55
タグ:

この戦略は"三重指標雲パターンをベースにしたトレンドフォロー戦略"と呼ばれています. 雲パターンを形成するために,3種類の異なるトレンドインジケーターを統合し,トレンドをフォローするために雲のブレイクアウトを取引します.

3つの指標は以下のとおりです.

カウフマン適応型移動平均値です 市場の変動を把握するのに敏感です

ハルフ移動平均は 滑らかな曲がりで 誤った信号をフィルタリングします

スーパートレンドメカニズム,高値を追いかけて低値を売らないように価格チャネルを形成する.

雲のパターンを形成します 上の帯は3つの値の中で最も高く 下の帯は最も低く

取引の論理は

高い値が雲の上を突破すると 買い信号として 上向きのチャネルを突破する信号になります

低値や低値が 雲の下位に突破すると ローングを閉じる 下向きの傾向が始まります

この戦略の利点は,指標コンボがトレンド状態をより正確に判断し,誤った信号を減らすことである.しかし,パラメータ最適化は依然として重要である.ストップ損失も不可欠である.

概要すると,複数の指標を使用して動向を決定することは,一般的で効果的なアプローチです.しかし,トレーダーは依然として,戦略調整における健全な裁量力と柔軟性が必要です.


/*backtest
start: 2022-09-12 00:00:00
end: 2023-02-03 00:00:00
period: 1d
basePeriod: 1h
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/
// © SnarkyPuppy

//@version=5
strategy("HKST Cloud", overlay=true, default_qty_type= strategy.percent_of_equity, default_qty_value=100)



////////////////nAMA
Lengthkaufman = input(20) 
xPrice = ohlc4
xvnoise = math.abs(xPrice - xPrice[1])
nfastend = 0.666
nslowend = 0.0645
nsignal = math.abs(xPrice - xPrice[Lengthkaufman])
nnoise = math.sum(xvnoise, Lengthkaufman)
nefratio = nnoise != 0? nsignal / nnoise : 0
nsmooth = math.pow(nefratio * (nfastend - nslowend) + nslowend, 2) 
nAMA =  float(0)
nAMA := nz(nAMA[1]) + nsmooth * (xPrice - nz(nAMA[1]))

//plot(nAMA,color=color.red)
///short=input(true)



///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////

////////hull moving average
hull_len=input(20)
hull= ta.hma(nAMA,hull_len)

///////atr trail
atr_factor=input(2)
atr_period=input(5)
[supertrend, direction] = ta.supertrend(atr_factor,atr_period)

/////////cloud
band1= math.max(supertrend,hull,nAMA)
band2= math.min(supertrend,hull,nAMA)

b1=plot(band1, "band1", color = color.rgb(76, 175, 79, 85), style=plot.style_linebr)
b2=plot(band2, "band2", color = color.rgb(255, 82, 82, 78), style=plot.style_linebr)
fill(b1,b2,color.rgb(12, 50, 186, 75))
longCondition = ta.crossover(high,band1) //or ta.crossover(low,band2)
if (longCondition)
    strategy.entry("Up", strategy.long)

shortCondition =  ta.crossunder(low,band2) or close<band2
if (shortCondition) 
    strategy.close("Up", shortCondition)



もっと