
다중 요인 역전 트렌드 거래 전략은 시장에서 연속적으로 상승하거나 하락한 후 잠재적인 역전점을 식별하기 위해 특별히 설계된 프로그램화된 거래 시스템이다. 이 전략은 가격 움직임을 분석하고, 거래량 확인과 채널 밴드 (Bulling Belt 또는 Kentner Channel) 와 같은 여러 기술 지표를 결합하여 시장의 과매매 또는 과매매 상태에서 역전 기회를 잡는다. 전략의 핵심은 여러 요인의 통합 판단을 통해 거래 신호의 신뢰성과 정확성을 향상시키는 것이다.
이 전략은 다음의 세 가지 핵심 요소에 기반하여 거래 신호를 생성합니다.
거래 신호의 트리거는 설정된 조건의 조합을 충족시키는 것이 필요합니다. 시스템은 K 라인을 확인한 후, 해당 조건의 위치에서 삼각형 표기를 그리고 그에 따른 다공간 작업을 수행합니다. 전략은 계좌 적당량의 80%를 각 거래의 위치 크기로 사용하고 0.01%의 거래 수수료를 고려합니다.
다중 인자 반전 트렌드 거래 전략은 가격 형태, 거래량 변화 및 채널 브레이크와 같은 여러 차원의 시장 정보를 종합적으로 분석하여 거래자에게 체계화된 반전 거래 프로그램을 제공합니다. 전략의 장점은 유연한 매개 변수 구성과 다차원 신호 확인 메커니즘에 있습니다. 그러나 동시에 시장 환경 적응 및 위험 제어에 주의를 기울여야합니다. 제안된 최적화 방향으로 전략은 실제 거래 디스크에서 더 나은 성과를 낼 수 있습니다.
/*backtest
start: 2024-12-03 00:00:00
end: 2024-12-10 00:00:00
period: 10m
basePeriod: 10m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy(title="The Bar Counter Trend Reversal Strategy [TradeDots]", overlay=true, initial_capital = 10000, default_qty_type = strategy.percent_of_equity, default_qty_value = 80, commission_type = strategy.commission.percent, commission_value = 0.01)
// Initialize variables
var bool rise_triangle_ready = false
var bool fall_triangle_ready = false
var bool rise_triangle_plotted = false
var bool fall_triangle_plotted = false
//Strategy condition setup
noOfRises = input.int(3, "No. of Rises", minval=1, group="STRATEGY")
noOfFalls = input.int(3, "No. of Falls", minval=1, group="STRATEGY")
volume_confirm = input.bool(false, "Volume Confirmation", group="STRATEGY")
channel_confirm = input.bool(true, "", inline="CHANNEL", group="STRATEGY")
channel_type = input.string("KC", "", inline="CHANNEL", options=["BB", "KC"],group="STRATEGY")
channel_source = input(close, "", inline="CHANNEL", group="STRATEGY")
channel_length = input.int(20, "", inline="CHANNEL", minval=1,group="STRATEGY")
channel_mult = input.int(2, "", inline="CHANNEL", minval=1,group="STRATEGY")
//Get channel line information
[_, upper, lower] = if channel_type == "KC"
ta.kc(channel_source, channel_length,channel_mult)
else
ta.bb(channel_source, channel_length,channel_mult)
//Entry Condition Check
if channel_confirm and volume_confirm
rise_triangle_ready := ta.falling(close, noOfFalls) and ta.rising(volume, noOfFalls) and high > upper
fall_triangle_ready := ta.rising(close, noOfRises) and ta.rising(volume, noOfRises) and low < lower
else if channel_confirm
rise_triangle_ready := ta.falling(close, noOfFalls) and low < lower
fall_triangle_ready := ta.rising(close, noOfRises) and high > upper
else if volume_confirm
rise_triangle_ready := ta.falling(close, noOfFalls) and ta.rising(volume, noOfFalls)
fall_triangle_ready := ta.rising(close, noOfRises) and ta.rising(volume, noOfRises)
else
rise_triangle_ready := ta.falling(close, noOfFalls)
fall_triangle_ready := ta.rising(close, noOfRises)
// Check if trend is reversed
if close > close[1]
rise_triangle_plotted := false // Reset triangle plotted flag
if close < close[1]
fall_triangle_plotted := false
//Wait for bar close and enter trades
if barstate.isconfirmed
// Plot triangle when ready and counts exceed threshold
if rise_triangle_ready and not rise_triangle_plotted
label.new(bar_index, low, yloc = yloc.belowbar, style=label.style_triangleup, color=color.new(#9CFF87,10))
strategy.entry("Long", strategy.long)
rise_triangle_plotted := true
rise_triangle_ready := false // Prevent plotting again until reset
if fall_triangle_ready and not fall_triangle_plotted
label.new(bar_index, low, yloc = yloc.abovebar, style=label.style_triangledown, color=color.new(#F9396A,10))
strategy.entry("Short", strategy.short)
fall_triangle_plotted := true
fall_triangle_ready := false
// plot channel bands
plot(upper, color = color.new(#56CBF9, 70), linewidth = 3, title = "Upper Channel Line")
plot(lower, color = color.new(#56CBF9, 70), linewidth = 3, title = "Lower Channel Line")