
개요: 이 전략은 부린 채널, KDJ 지표 및 트렌드 추적을 사용하여 가격 돌파 작업을 수행하는 전략입니다. 이 전략은 돌파점에서 구매 및 판매 작업을 수행하고 위험을 제어하기 위해 스톱 라인을 설정할 수 있습니다.
전략적 원칙:
우위 분석:
위험과 개선:
최적화 제안:
결론:
이 전략은 브린 채널, RSI 등 여러 지표를 종합적으로 사용하여 구매와 판매 시기를 판단하고, 일정 거래 신호의 정확성을 보장하면서도 위험을 제어하기 위해 손실을 설정합니다. 그러나 특정 품종에 대한 변수 최적화가 필요하여 신호를 더 정확하고 신뢰할 수 있습니다. 또한, 더 많은 인자를 추가하여 다인자를 구성하는 것도 고려할 수 있습니다.
/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Custom Strategy", overlay=true)
length = 14
mult = 0.75
atr = atr(length) * mult
// Moving averages
ma15 = sma(close, 15)
ma30 = sma(close, 30)
// Bullish Engulfing pattern
bullishEngulfing = close[1] < open[1] and close > open and close[1] < open and close > open[1]
// Bearish Engulfing pattern
bearishEngulfing = close[1] > open[1] and close < open and close[1] > open and close < open[1]
// RSI
rsi = rsi(close, length)
// Buy condition
if (bullishEngulfing and close[1] > ma15 and rsi > 50)
strategy.entry("Buy", strategy.long)
strategy.exit("Sell", "Buy", stop=close - atr)
// Sell condition
if (bearishEngulfing and close[1] < ma15 and rsi < 50)
strategy.entry("Sell", strategy.short)
strategy.exit("Cover", "Sell", stop=close + atr)
// Plotting
plotshape(series=strategy.position_size > 0, title="Buy", location=location.belowbar, color=color.green, style=shape.labelup, text="Buy")
plotshape(series=strategy.position_size < 0, title="Sell", location=location.abovebar, color=color.red, style=shape.labeldown, text="Sell")