켈트너 채널 스톱 손실 취득 전략

저자:차오장, 날짜: 2023-09-15 14:41:46
태그:

이것은 켈트너 채널 스톱 로스 테크 프로프트 전략에 대한 SEO 최적화 기사입니다.

전략 개요

켈트너 채널 스톱 로스 테이크프로프트 전략은 스톱 로스 및 테이크프로프트 규칙을 통합하여 켈트너 채널 분석을 기반으로 거래 결정을 최적화합니다. 상부 및 하부 채널 밴드와 가격 관계를 모니터링하고, 브레이크오웃에서 긴 또는 짧은 거래를 입력하고 최적의 스톱 로스 및 테이크프로프트 수준에 따라 위험과 보상을 균형 잡습니다.

전략 논리

  1. 켈트너 채널의 중부, 상부, 하부 대역을 계산합니다.

  2. 가격이 상위권에 닿을 때 긴 기회를 고려하고, 하위권에 닿을 때 짧은 기회를 고려하십시오.

  3. 상위 지대에서 긴 거래를 하고, 하위 지대에서 짧은 거래를 합니다.

  4. 엔트리 가격의 특정 비율로 수익 목표를 설정하고 엔트리 가격의 특정 비율로 스톱 손실 목표를 설정하십시오.

이 전략의 장점은 트렌드가 잘못되면 적시에 손실을 줄이고 파도가 끝나기 전에 이익을 취하기 위해 스톱 로스 및 수익을 취하는 규칙을 도입하는 것입니다. 또한 지속적인 트렌드 거래 참여를위한 재입구 신호를 제공합니다.

매개 변수들은 다양한 자산에 최적화되어 최상의 리스크/보상 균형이 이루어질 수 있습니다.

전략 의 장점

  • 켈트너 채널은 트렌드 방향을 결정합니다.

  • 손해를 멈추고 수익을 취하면 보상을 최적화합니다.

  • 매끄러운 입구와 출구는 거짓 브레이크를 방지합니다

  • 조정에 대한 유연한 매개 변수

  • 다른 지표와 결합 가능

위험 경고

  • 스톱 러스, 취익 비율을 높여야 합니다.

  • 일부 스톱 로스 위험은 여전히 남아 있습니다.

  • 채널은 손실로 깨질 수 있습니다.

  • 작은 스톱 손실은 빈번한 스톱을 유발합니다.

결론

켈트너 채널 스톱 로스 테이크 프로프트 전략은 트렌드를 따라가면서 위험을 제어함으로써 전통적인 채널 거래를 최적화합니다. 광범위한 백테스팅과 매개 변수 조정으로 우수한 전략 결과를 얻을 수 있습니다. 이 전략은 안정성을 점차적으로 향상시키기 위해 심도 있는 연구와 라이브 테스트가 필요합니다.


/*backtest
start: 2023-08-15 00:00:00
end: 2023-08-23 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
strategy(title="Optimized Keltner Channels Strategy for BTC", overlay=true)
length = input(9, minval=1)
mult = input(1.0, "Multiplier")
src = input(close, title="Source")
exp = input(true, "Use Exponential MA")
BandsStyle = input("Average True Range", options = ["Average True Range", "True Range", "Range"], title="Bands Style")
atrlength = input(18, "ATR Length")
sl = input(defval=22, minval=0, title="Stop Loss (%)")
tp = input(defval=21, minval=0, title="Take Profit (%)")

esma(source, length)=>
	s = sma(source, length)
	e = ema(source, length)
	exp ? e : s
ma = esma(src, length)
rangema = BandsStyle == "True Range" ? rma(tr(true), length) : BandsStyle == "Average True Range" ? atr(atrlength) : rma(high - low, length)
upper = ma + rangema * mult
lower = ma - rangema * mult
c = color.blue
u = plot(upper, color=color.green, title="Upper")
plot(ma, color=#0094FF, title="Basis")
l = plot(lower, color=color.red, title="Lower")
fill(u, l, color=#0094FF, transp=95, title="Background")
crossUpper = crossover(src, upper)
crossLower = crossunder(src, lower)
bprice = 0.0
bprice := crossUpper ? close+syminfo.mintick : nz(bprice[1])
sprice = 0.0
sprice := crossLower ? close-syminfo.mintick : nz(sprice[1])
crossBcond = false
crossBcond := crossUpper ? true
     : na(crossBcond[1]) ? false : crossBcond[1]
crossScond = false
crossScond := crossLower ? true
     : na(crossScond[1]) ? false : crossScond[1]
cancelBcond = crossBcond and (src < ma or high >= bprice )
cancelScond = crossScond and (src > ma or low <= sprice )
if (cancelBcond)
	strategy.cancel("KltChLE")
if (crossUpper)
	strategy.entry("KltChLE", strategy.long, stop=bprice, comment="Long")
if (cancelScond)
	strategy.cancel("KltChSE")
if (crossLower)
	strategy.entry("KltChSE", strategy.short, stop=sprice, comment="Short")

strategy.exit("long exit", "KltChLE", profit = close * tp * 0.01 / syminfo.mintick, loss = close * sl * 0.01 / syminfo.mintick)
strategy.exit("Short exit", "KltChSE", profit = close * tp * 0.01 / syminfo.mintick, loss = close * sl * 0.01 / syminfo.mintick)

plot(bprice, color=color.green)
plot(sprice, color=color.red)

더 많은