
최고 최저 중심 회전 전략은 트렌드 추적 전략이다. 그것의 주요 아이디어는 지난 일정 기간 동안의 최고 가격과 최저 가격의 중간 가격을 기준 가격으로 계산하고, 그 기준 가격에 따라 변동률과 결합하여 건설 포지션 및 포지션 영역을 계산한다. 가격이 건설 포지션 영역에 들어갔을 때, 더 많이하고, 가격이 평소 포지션 영역에 들어갔을 때, 평소 포지션한다.
이 전략은 다음과 같은 몇 가지 단계를 통해 이루어집니다.
이 방법을 통해, 가격이 트렌드 상태에 진입했을 때 트렌드를 실시간으로 추적할 수 있으며, 또한 변동률을 통해 위험을 제어할 수 있다.
이 전략은 다음과 같은 장점이 있습니다.
이 전략에는 몇 가지 위험도 있습니다.
이러한 위험을 통제하기 위해, 다음과 같은 몇 가지 측면에서 최적화할 수 있습니다.
이 전략에는 더 많은 최적화 가능성이 있습니다:
이러한 최적화를 통해 전략의 안정성과 수익성을 더욱 높일 수 있을 것으로 기대된다.
최고 최저 중심 회전 전략은 간단한 실용적인 트렌드 추적 전략이다. 가격 변화를 적시에 포착하고 트렌드를 추적하면서도 변동률을 통해 위험을 제어할 수 있다. 이 전략은 구현하기 쉽고, 수량 거래 초보자 학습과 연습에 적합하다. 매개 변수 최적화 및 규칙 최적화를 통해 전략의 효과를 더욱 향상시킬 수 있다.
/*backtest
start: 2023-11-27 00:00:00
end: 2023-12-27 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Highest/Lowest Center Lookback Strategy", overlay=true)
lookback_length = input(200, type=input.integer, minval=1, title="Lookback Length")
smoother_length = input(5, type=input.integer, minval=1, title="Smoother Length")
atr_length = input(10, type=input.integer, minval=1, title="ATR Length")
atr_multiplier = input(1.5, type=input.float, minval=0.5, title="ATR Multiplier")
vola = atr(atr_length) * atr_multiplier
price = sma(close, 3)
l = ema(lowest(low, lookback_length), smoother_length)
h = ema(highest(high, lookback_length), smoother_length)
center = (h + l) * 0.5
upper = center + vola
lower = center - vola
trend = price > upper ? true : (price < lower ? false : na)
bull_cross = crossover(price, upper)
bear_cross = crossunder(price, lower)
strategy.entry("Buy", strategy.long, when=bull_cross)
strategy.close("Buy", when=bear_cross)
plot(h, title="High", color=color.red, transp=75, linewidth=2)
plot(l, title="Low", color=color.green, transp=75, linewidth=2)
pc = plot(center, title="Center", color=color.black, transp=25, linewidth=2)
pu = plot(upper, title="Upper", color=color.green, transp=75, linewidth=2)
pl = plot(lower, title="Lower", color=color.red, transp=75, linewidth=2)
fill(pu, pc, color=color.green, transp=85)
fill(pl, pc, color=color.red, transp=85)
bgcolor(trend == true ? color.green : (trend == false ? color.red : color.gray), transp=85)