大波大落下戦略

作者: リン・ハーンチャオチャン開催日:2023年11月6日 15:48:22
タグ:

img

概要

ビッグ・サーージ・ビッグ・フォール戦略は,ポジションに入るために巨大なブイッシュ・ベアッシュ・キャンドルスタイクを検出する.巨大なブイッシュ・キャンドルスタイクを検出するとショートになり,巨大なベアッシュ・キャンドルスタイクを検出するとロングする.ストップ・ロスはシグナルキャンドルスタイクの下値 (ロングの逆) に置かれ,利益はストップ・ロスの1倍に設定される.ユーザーは,ブイッシュ/ベアッシュ・キャンドルスタイクの最小サイズと,特定の期間の平均バーレンジの倍数を定義することができます.

戦略の論理

この戦略の基本的な論理は

  1. 現在のキャンドルスタイルの範囲 (高低) とキャンドルスタイルのボディサイズ (閉じる場合プラス > オープン,閉じる場合マイナス < オープン) を計算する

  2. 過去N個のキャンドルスタイルの平均範囲を計算します.

  3. 現在のキャンドルスタイクを満たすかどうかを確認します:範囲 >=平均範囲 × 倍数 AND サイズ >=範囲 x ミニ体サイズ係数

  4. 上記条件を満たす場合は,信号が発信されます:上昇するキャンドルスタイクにショート,下落するキャンドルスタイクにショート

  5. ストップ・ロスを有効にしたり,利益を得たりするオプション: ストップ・ロスは低値で,ストップ・ロスの係数 x の範囲で,利益を得たりするオプション 1 x ストップ・ロスは

ボディサイズフィルターはドジを除外する. ダイナミック・平均レンジは市場の変化に適応する. ストップ・ロストとテイク・プロフィートは合理的な引き下げ制御を可能にします.

利点

この戦略の最大の利点は 2つの判断に基づいた高品質のトレンド逆転信号を捉えることです

  1. 巨大な上昇/下落のキャンドルスタイクは,おそらく,トレンドが延長された動きの後で枯渇していることを示唆しています

  2. ダイナミック平均値を超えた異常な幅は

さらに,ストップ・ロストとテイク・プロフィートの設定は合理的で,追いかけるのではなく,効果的な損失制御を可能にします.

この戦略は,全体的に,高品質な構造的転換点を特定し,効率的な実行を可能にします. 修正に巻き込まれないようにすることで,傾向の追従者に適しています.

リスク

主なリスクは2つの側面から生じる.

  1. 巨大なバーは,停止損失狩猟,偽の信号を作成することができます

  2. ストップ損失は,損失を効果的に制御するにはあまりにも広い可能性があります.

最初のリスクでは,最小サイズフィルターを追加することで,誤った信号が減少するだけでなく,機会が失われます.パラメータを最適化するためにバックテストが必要です.

2つ目のリスクについては,ストップ損失係数を調整することで,サポートに近いストップを最適化できる.また,ストップによる損失を補償するために,テイク・プロフィート比率を増やすことも検討する.

増進 の 機会

この戦略をさらに改善する方法はいくつかあります.

  1. 逆トレンド取引を避けるためにトレンド方向フィルターを追加する

  2. バックテストによってパラメータを最適化して最良の組み合わせを見つける

  3. 巨大なキャンドルスタイルの高いボリュームを確保するためにボリュームフィルターを追加します

  4. 偽信号を減らすために移動平均値やボリンジャー帯のような追加のフィルターを考慮してください

  5. テストパラメータを最適化するための異なる製品

  6. 価格行動に基づくダイナミック調整のためにトラッキングストップ損失を追加します.

  7. 初期ストップ・ロスの後に再入力の機会を検討する

上記の改良により,この戦略ははるかに効果的になり,利益の確率を向上させることができます.最適なパラメータを見つけるために広範なバックテストと最適化が必要です.

結論

ビッグ・サーージ・ビッグ・フォール戦略は,ストップ・ロストとテイク・プロフィート管理で巨大なキャンドルスタイク逆転から利益を得ます.高品質の構造的ターニングポイントを成功裏に特定し,トレンドトレーダーに貴重な情報を提供します.パラメータと論理最適化により,この戦略は実践的な意思決定ツールになることができます.その単純な論理と直感的な経済学はまた,理解し適用しやすくします.全体的に,この戦略は研究し実施する価値のある堅牢な枠組みを提供します.


/*backtest
start: 2023-10-06 00:00:00
end: 2023-11-05 00:00:00
period: 1h
basePeriod: 15m
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/
// © tweakerID

// This strategy detects and uses big bars to enter a position. When the Big Bar 
// is bearish (red candle) the position will be long and viceversa
// for short positions. The stop loss (optional) is placed on the low of the 
// candle used to trigger the position and user inputs allow you to modify the
// size of the SL. Take profit is placed on a reward ratio of 1. User can also modify 
// the size of the bar body used to determine if we have a real Big Bar and
// filter out Doji bars. Big Bars are determined relative to the previous X period size, 
// which can also be modified, as well as the required size of the Big Bar relative to this period average.

//@version=4
strategy("Big Bar Strategy", overlay=false)

direction = input(0, title = "Direction (Long=1, Both=0, Short=-1 ", type=input.integer, minval=-1, maxval=1)
strategy.risk.allow_entry_in(direction == 0 ? strategy.direction.all : (direction < 0 ? strategy.direction.short : strategy.direction.long))

//Inputs
barsizemult=input(1, step=.1, title="SL Mult")
TPbarsizemult=input(1, step=.1, title="TP Mult")
barsizeThreshold=input(.5, step=.1, minval=.5, maxval=.9, title="Bar Body Size")
period=input(10)
mult=input(2, step=.2, title="Big Size Avg Mult to determine Big Bar")
i_reverse=input(false, title="Reverse Trades")
SLon=input(false, title="Use SL / TP")

//Calculations
barsize=high-low
barbodysize=close>open?(open-close)*-1:(open-close)
barsizeavg=sum(barsize, period)/period
bigbar=barsize >= barsizeavg*mult and barbodysize>barsize*barsizeThreshold

//Entry Logic
longCondition = close < open and bigbar //and strategy.position_size==0
shortCondition = close > open and bigbar //and strategy.position_size==0

//SL & TP Calculations
longTP=strategy.position_avg_price + (valuewhen(longCondition,barsize,0)*TPbarsizemult)
longSL=strategy.position_avg_price - (valuewhen(longCondition,barsize,0)*barsizemult)
shortTP=strategy.position_avg_price - (valuewhen(shortCondition,barsize,0)*TPbarsizemult)
shortSL=strategy.position_avg_price + (valuewhen(shortCondition,barsize,0)*barsizemult)
TP=strategy.position_size>0?longTP:shortTP
SL=strategy.position_size>0?longSL:shortSL

//Entries
if (longCondition)
    strategy.entry("long", long=not i_reverse?true:false)
    alert("Big Bar")
if (shortCondition)
    strategy.entry("short", long=not i_reverse?false:true)
    alert("Big Bar")
if SLon
    strategy.exit("SL & TP", "long", stop=SL, limit=TP)
    strategy.exit("SL & TP", "short", stop=SL, limit=TP)
    
// Plots
barcolor(bigbar ? color.white : na)
plot(barsizeavg, transp=100, title="Barsize Avg")
plot(barsize, transp=100, title="Bar Size")
plot(barbodysize, transp=100, title="Bar Body Size")
plot(SLon?TP:na, color=color.green, style=plot.style_cross, title="TP")
plot(SLon?SL:na, color=color.red, style=plot.style_cross, title="SL")
plotshape(longCondition ? 1 : na, style=shape.triangleup, location=location.belowbar, color=color.green, title="Bullish Setup")
plotshape(shortCondition ? 1 : na, style=shape.triangledown, location=location.abovebar, color=color.red, title="Bearish Setup")



もっと