
大大跌策略は,巨額陽線陰線を検出することによって入場する策略である。巨額陽線を検出すると空き,巨額陰線を検出すると多行する。止損は,信号を触発した柱線の低点にある。多行すると逆である),止損は止損の1倍である。ユーザは,陽線陰線の最小体積を定義することができ,また,以前の一定期間における平均柱体積の倍数である。
この戦略の核心的な論理は:
現在のK線の総波動範囲 ((高点 - 低点) と実体サイズ ((閉盘価格が開盘価格より大きい場合が正で,逆に負である) を計算する
過去のN根K線内変動幅の平均値を計算する
現在のK線が満たされているかどうかを判断する:波動範囲>=平均波動幅のx倍数,および実体サイズ>=波動範囲x最小実系数
上記の条件を満たすなら,トリガー信号:陽線が空っぽ,陰線が多すぎる
ストープをオンにするかどうかを選択できます. ストープは信号柱の低点とストープ係数の倍数の波動幅; ストープはストープの1倍
実体判断で線段をフィルタリングし,十分な力があることを確認する. 動的に平均波動幅を計算することで,固定値が市場変化に適応できないことを避ける. 止損を合理的な引き戻し率で設定し,係数で調整することができる.
この戦略の最大の利点は,高品質のトレンド反転信号を捉えることです.
巨大な陽線陰線は,このトレンドが前期に強くなっていることを示しているので,おそらく,全体のトレンドの構造的な転換点です.
平均波動幅を動的に計算することで,異常波動を正常レベルを超えて捕捉し,通常の回調の動きをフィルターします.
さらに,ストップ・ストップの設定も非常に合理的で,単一のストップを効果的に制御でき,同時にストップ・ストップのリターン率は1であり,落下をあまり追及しない.
全体として,この戦略は,高品質の構造的な転換点を位置付け,効率的な操作を実現することに成功した.これは,トレンドを追跡するトレーダーにとって非常に適しており,中間過程で閉じ込められることを避けることができる.
この戦略の主なリスクは次の2つです.
大の急落は,大を止めて,無効な信号を作り出したかもしれない.
止損設定は過度に緩やかであり,損失を効果的に制御することはできません.
最初のリスクに対して,最小波動幅と実体サイズを増やすことで誤判率をフィルターすることができるが,いくつかの機会を逃すこともある。反測結果に基づいてバランスポイントを見つける必要がある。
2つ目のリスクは,ストップレード係数を調整して,ストップレードをサポート値に近ければよいが,あまりにも緊密にはならないように最適化することができる.また,ストップレードによる損失を補うために,ストップレードのリターン率を増やすことも考慮する必要がある.
この戦略はさらに改善できる点があります.
トレンド方向の判断を高め,逆操作を避ける
パラメータの設定を最適化して,最適なパラメータの組み合わせを見つける
大陽線と大陰線の交差量を十分に確保するために,交差量のフィルタリングを増やす.
プラットフォーム,ブリンバンドなどのフィルタリング条件を追加することを検討し,誤判の可能性を減らす
異なる品種のパラメータの効果をテストし,パラメータを最適化
ストップ・トラッキングを追加し,ストップ・損失を価格の動向に動的に調整できます.
再び入学する機会を考慮する
上記のいくつかのポイントを最適化することで,この戦略をより有効にすることができ,その結果,利益の確率を本当に高めることができます. 充分な回測と最適化が必要で,最適なパラメータを見つけることができます.
大大跌の戦略は,巨大な陽線陰線を捕獲することで高効率の利得を実現し,ストップ・ストップの設定を有している.それは,高品質の構造的反転の機会を成功的に位置づけ,トレンドトレーダーに非常に貴重な情報を提供することができる.パラメータ最適化とルール最適化により,この戦略は,非常に実用的な補助的な意思決定ツールになることができる.その単純な取引論理と直接的な経済的な意味は,理解し,掌握しやすくする.全体的に,この戦略は,研究と深入な応用に価値のある非常に良い戦略の枠組みを提供している.
/*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")