
동력 포착 통로 전략은 Donchian 통로를 기반으로 한 변종이다. 그것은 최고 가격대, 최저 가격대, 그리고 최고 가격대와 최저 가격대 평균을 나타내는 기점으로 구성된다. 이 전략은 트렌드 품종의 둘레와 일선 시간 프레임에서 매우 유용하다. 이것은 QuantCT 응용 프로그램에서 사용되는 구현이다.
이 작업 모드를 다중 공백 또는 다중 머리로 설정할 수 있습니다.
고정된 스톱로드를 설정하거나 무시할 수도 있습니다. 이 전략은 입시 및 퇴출 신호에 따라만 작동합니다.
이 전략의 핵심 논리는 Donchian channel 지표에 기초한다. Donchian channel은 20 일간의 최고 가격, 최저 가격 및 종결 가격의 평균으로 구성되어 있다.
이 전략은 Donchian channel의 변종이다. 그것은 최고 가격대, 최저 가격대, 그리고 최고 가격대와 최저 가격대 평균값을 나타내는 기본선으로 구성된다. 구체적인 논리는 다음과 같다:
이 전략의 장점은 가격의 트렌드 동력을 효과적으로 포착할 수 있다는 것이다. 가격이 경로를 돌파하는 것을 기다림으로써 진정한 트렌드 시작을 판단하여, 대화에 의해 불필요한 손실을 피할 수 있다.
해결책:
동력 포착 통로 전략은 가격 추세를 포착하여 상당한 수익 기회를 제공합니다. 동시에, 그것은 또한 위험을 가지고 있으며, 위험을 통제하기 위해 파라미터를 적절하게 조정해야합니다. 계속적으로 진입 시점 선택과 중단 손실 논리를 최적화함으로써이 전략은 매우 훌륭한 추세 추적 시스템이 될 수 있습니다. 그것은 간단한 거래 규칙과 명확한 신호 판단으로 이해하기 쉽고 구현하기 쉬우므로 초보자 거래자에게 적합합니다.
/*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)