ダブル・ボリンジャー・バンドのブレイクアウト戦略

作者: リン・ハーンチャオチャン, 日付: 2023-12-25 13:20:31
タグ:

img

概要

ダブル・ボリンジャー・バンド・ブレイクアウト戦略は,トレンドフォロー戦略である.ボリンジャー・バンドの上下帯を使用して価格動向を判断し,価格が内部ボリンジャー・バンドを突破し,価格が外部のボリンジャー・バンドを下回るとロングポジションを確立する.

戦略の論理

この戦略は,最初に指定された期間における移動平均値と標準偏差を計算し,その後,移動平均値±1標準偏差を内帯と移動平均値±1.5標準偏差を外帯で使って,ダブルボリンジャー帯を構成する.

価格が上部内帯を突破すると,市場が牛走を開始し,ロングになる.価格が下部内帯を下回ると,熊市場が始まってショートになる.

ロングポジションの出口利益は,価格が下の外側の帯を下回るときである.ショートポジションの出口利益は,価格が上側の帯を下回るときである.

ストップ・ロスの出口も設定します ストップ・ロスの出口も設定します

利点分析

ダブル・ボリンガー・バンドのブレイクアウト戦略は以下の利点があります

  1. 価格動きを判断するためにダブルボリンジャー帯を使用することで,効果的なトレンドフォローが可能になります.
  2. 内部帯のブレイクを入力することで,不要な平均逆転取引を避ける.
  3. 利回り,ストップ・ロスト,ストップ・ロストを有効にコントロールする
  4. 最適化可能なパラメータにより,異なる製品に調整できます.

リスク分析

ダブル・ボリンジャー・バンドのブレイクアウト戦略にはリスクもあります

  1. 変動市場では頻繁に入場し,ストップ損失が発生する可能性があります.
  2. パラメータの設定が正しくない場合,入口が簡単すぎたり,出口が難しいこともあります.
  3. 脱出は時に 誤った信号を出し 脱出が失敗します

これらのリスクに対処するために,パラメータを調整したり,追加のフィルターを追加したり,リスクを減らすために手動でブレイクを監視したりできます.

オプティマイゼーションの方向性

ダブル・ボリンジャー・バンドのブレイクアウト戦略は,いくつかの方法で最適化できます.

  1. 移動平均値と標準偏差のパラメータを最適化し,異なる製品に対応する.
  2. 誤ったブレイクを避けるため,ボリューム,MACD,その他のフィルターを追加する.
  3. マシン学習方法を使用してパラメータを動的に最適化する.
  4. 高周波間隔で戦略を複製して 利益の可能性を拡大します

結論

ダブルボリンガーバンドブレイクアウト戦略は,一般的なトレンドフォローアプローチで,ボリンガーバンドと時間エントリとの関係で価格の変化を全体的に判断する.この戦略は,ダブルバンドとリスク制御のための科学的退出メカニズムを使用して利益目標を設定する.最適化されたパラメータとリスク制御により,良い結果を達成することができます.


/*backtest
start: 2023-12-17 00:00:00
end: 2023-12-24 00:00:00
period: 15m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2
strategy("BB Strat",default_qty_type = strategy.percent_of_equity, default_qty_value = 100,currency="USD",initial_capital=100, overlay=true)
l=input(title="length",defval=100)
pbin=input(type=float,step=.1,defval=.25)
pbout=input(type=float,step=.1,defval=1.5)
ma=sma(close,l)
sin=stdev(ma,l)*pbin
sout=stdev(ma,l)*pbout
inu=sin+ma
inb=-sin+ma
outu=sout+ma
outb=-sout+ma
plot(inu,color=lime)
plot(inb,color=lime)
plot(outu,color=red)
plot(outb,color=yellow)

inpTakeProfit = input(defval = 0, title = "Take Profit", minval = 0)
inpStopLoss = input(defval = 0, title = "Stop Loss", minval = 0)
inpTrailStop = input(defval = 0, title = "Trailing Stop Loss", minval = 0)
inpTrailOffset = input(defval = 0, title = "Trailing Stop Loss Offset", minval = 0)
useTakeProfit = inpTakeProfit >= 1 ? inpTakeProfit : na
useStopLoss = inpStopLoss >= 1 ? inpStopLoss : na
useTrailStop = inpTrailStop >= 1 ? inpTrailStop : na
useTrailOffset = inpTrailOffset >= 1 ? inpTrailOffset : na


longCondition = close>inu and rising(outu,1) 
exitlong = (open[1]>outu and close<outu) or crossunder(close,ma)

shortCondition = close<inb and falling(outb,1)
exitshort = (open[1]<outb and close>outb) or crossover(close,ma)

strategy.entry(id = "Long", long=true, when = longCondition)
strategy.close(id = "Long", when = exitlong)
strategy.exit("Exit Long", from_entry = "Long", profit = useTakeProfit, loss = useStopLoss, trail_points = useTrailStop, trail_offset = useTrailOffset, when=exitlong)

strategy.entry(id = "Short", long=false, when = shortCondition)
strategy.close(id = "Short", when = exitshort)
strategy.exit("Exit Short", from_entry = "Short", profit = useTakeProfit, loss = useStopLoss, trail_points = useTrailStop, trail_offset = useTrailOffset, when=exitshort)

もっと