T3移動平均チャネルブレイクアウト戦略


作成日: 2023-09-14 15:51:25 最終変更日: 2023-09-14 15:51:25
コピー: 0 クリック数: 768
1
フォロー
1617
フォロワー

戦略原則

この戦略は,T3平均線とそのチャネルを使用して,トレンドの方向を識別し,価格がチャネルを突破すると取引シグナルを生成します.

具体的には,

  1. 平均線 T3 を計算して,中線を表します.

  2. 平均線の通路範囲を計算し,上線は平均線加範囲,下線は平均線減範囲とする.

  3. 価格が上昇する時には,もっとやりましょう.

  4. 価格が下落する時に空白を空白する

  5. 背景の色が変化すると,トレンドが逆転し,判断を助けます.

T3平均線は,遅延が少ない平均線であり,通路の突破時に迅速に反応し,転向を捕捉するのに有利である.この戦略は,背景の色を補助して長期の傾向を判断し,複数の要因を統合して取引のタイミングを決定する.

戦略的優位性

  • T3 平均線遅れが小さく,反応が敏感である

  • 経路の突破は 明確な取引信号を発信しています

  • 背景の色を判断して 間違ったトレードを避ける

戦略リスク

  • 適切なパラメータを決定するために繰り返しテストする必要があります.

  • 突破取引は騙されやすいので注意が必要です.

  • 信号は頻繁で,突破幅を適当に増幅する.

要約する

この戦略は,T3平均線の感性を利用して,通路突破点の位で取引する.背景色で判断する長線傾向を補助する.パラメータの最適化により,効率性と安定性の間のバランスを取ることができる.しかし,過度な取引を防ぐことに注意する.

[trans]

ストラテジーソースコード
/*backtest
start: 2022-09-07 00:00:00
end: 2023-04-15 00:00:00
period: 4d
basePeriod: 1d
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/
// © Trader_7ye

//@version=4

strategy(title="T3MA_KC_7ye  Strategy", shorttitle="T3MA_KC_7ye  Strategy",max_bars_back=500,overlay=true,default_qty_type=strategy.percent_of_equity,default_qty_value=100,initial_capital=5000,currency=currency.USD)

t3(src,len)=>
    xe1 = ema(src, len)
    xe2 = ema(xe1, len)
    xe3 = ema(xe2, len)
    xe4 = ema(xe3, len)
    xe5 = ema(xe4, len)
    xe6 = ema(xe5, len)
    b = 0.7
    c1 = -b*b*b
    c2 = 3*b*b+3*b*b*b
    c3 = -6*b*b-3*b-3*b*b*b
    c4 = 1+3*b+b*b*b+3*b*b
    c1 * xe6 + c2 * xe5 + c3 * xe4 + c4 * xe3
    
 
Length = input(title="DTMA Lenth", type=input.integer, defval=24, minval=1)
xPrice = input(title="DTMA Source", type=input.source, defval=close)
T3ma=t3(xPrice,Length)

upCol = T3ma > T3ma[1] 
downCol = T3ma < T3ma[1]


range= high - low
rangema=t3(range,Length)

upper = T3ma + rangema
lower = T3ma - rangema

myColor = upCol ? color.lime : downCol ? color.red : na
plot(T3ma, color=myColor, title="T3 Slow")

c = color.blue
u = plot(upper, color=#0094FF, title="Upper")
l = plot(lower, color=#0094FF, title="Lower")
fill(u, l, color=#0094FF, transp=95, title="Background")
buySignal = upCol and ohlc4>upper
sellSignal= downCol and ohlc4<lower

//=======输出======= 
//多空颜色判断
direction=0
direction:=buySignal?1:sellSignal?-1:direction[1]
macolor=direction==1?color.green:color.red

//多信号处理为一个信号
alertlong = direction!=direction[1] and direction== 1
alertshort= direction!=direction[1] and direction==-1
bgcolor(alertshort ? color.red : alertlong?color.lime:na, transp=20)

if (alertlong)
    strategy.entry("Long", strategy.long)
if (alertshort)
    strategy.entry("Short",strategy.short)