
動量捕捉チャネル戦略は,ドンチアンチャネルに基づく変形である.これは,最高価格帯,最低価格帯,そして最高価格帯と最低価格帯の平均値としてベースラインで構成されている.この戦略は,トレンドの品種の周線と日線の時間枠で非常に有用である.これはQuantCTアプリケーションで使用される実装である.
操作モードを多空または多頭のみに設定できます.
また,固定ストップを設定したり,無視したりして,入場と退出のシグナルのみで動作するようにすることもできます.
この戦略の核心的な論理は,ドンチアンチャネル指標に基づいています.ドンチアンチャネルは,20日の最高値,最低値,閉店価格の平均値で構成されています.チャネルを突破した価格の上下軌道に基づいて,トレンドの方向と可能な逆転を判断します.
この戦略はドンチアン通路の変形である.これは最高価格帯,最低価格帯,そして最高価格帯と最低価格帯の平均値としてベースラインで構成されている.具体的論理は以下のとおりである.
この戦略の優点は,価格のトレンド動力を効果的に捕捉できる点にある.価格が上下を突破するのを待つことで,真のトレンドの開始を判断することで,無駄な損失を回避することができます.
解決策は
動態キャプチャチャネル戦略は,価格のトレンドをキャプチャすることによって,かなりの利益の機会を提供します. 同時に,それは一定のリスクを持ち,リスク管理のためにパラメータを適切に調整する必要があります. 継続的に入場タイミング選択とストップダストロジックを最適化することによって,この戦略は,非常に優れたトレンドフォローシステムになることができます.
/*backtest
start: 2023-11-19 00:00:00
end: 2023-12-19 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/
// © QuantCT
//@version=4
strategy("Donchian Channel Strategy Idea",
shorttitle="Donchian",
overlay=true,
pyramiding=0,
default_qty_type=strategy.percent_of_equity,
default_qty_value=100,
initial_capital=1000,
commission_type=strategy.commission.percent,
commission_value=0.075)
// ____ Inputs
high_period = input(title="High Period", defval=10)
low_period = input(title="Low Period", defval=10)
long_only = input(title="Long Only", defval=false)
slp = input(title="Stop-loss (%)", minval=1.0, maxval=25.0, defval=5.0)
use_sl = input(title="Use Stop-Loss", defval=false)
// ____ Logic
highest_high = highest(high, high_period)
lowest_low = lowest(low, low_period)
base_line = (highest_high + lowest_low) / 2
enter_long = (close > highest_high[1])
exit_long = (close < base_line)
enter_short = (close < lowest_low[1])
exit_short = (close > base_line)
strategy.entry("Long", strategy.long, when=enter_long)
strategy.close("Long", when=exit_long)
if (not long_only)
strategy.entry("Short", strategy.short, when=enter_short)
strategy.close("Short", when=exit_short)
// ____ SL
sl_long = strategy.position_avg_price * (1- (slp/100))
sl_short = strategy.position_avg_price * (1 + (slp/100))
if (use_sl)
strategy.exit(id="SL", from_entry="Long", stop=sl_long)
strategy.exit(id="SL", from_entry="Short", stop=sl_short)
// ____ Plots
colors =
strategy.position_size > 0 ? #27D600 :
strategy.position_size < 0 ? #E30202 :
color.orange
highest_high_plot = plot(highest_high, color=colors)
lowest_low_plot = plot(lowest_low, color=colors)
plot(base_line, color=color.silver)
fill(highest_high_plot, lowest_low_plot, color=colors, transp=90)