
이 전략은 다중 이동 평균과 브린 밴드 지표에 기반한 고급 정량 거래 시스템이다. 전략의 핵심은 5주기 및 11주기 이동 평균의 교차 신호를 주요 입시 근거로 사용하며, 55주기 이동 평균과 브린 밴드와 결합하여 신호 필터링과 위험 통제를 수행한다. 이 전략은 특히 옵션 거래에 적합하며, 특히 3분 및 5분 시간 주기에서 평준 옵션을 작동한다.
전략이 작동하는 핵심 논리는 다음과 같은 몇 가지 핵심 요소를 포함합니다.
이 전략은 여러 가지 기술적 지표를 결합하여 비교적 완전한 거래 시스템을 구축합니다. 핵심 장점은 다층의 신호 확인 메커니즘과 역동적인 위험 관리 프로그램입니다. 약간의 최적화 공간이 있지만, 전략의 기본 프레임 워크는 안정적이며 옵션 거래자의 사용에 특히 적합합니다. 지속적인 최적화 및 개선으로 전략은 실제 거래에서 더 나은 성능을 기대합니다.
/*backtest
start: 2025-02-12 00:00:00
end: 2025-02-18 08:00:00
period: 5m
basePeriod: 5m
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("MA5 MA11 Bollinger Bands 22 Strategy", overlay=true)
// Define indicators
ma5 = ta.sma(close, 5)
ma11 = ta.sma(close, 11)
ma55 = ta.sma(close, 55)
basis = ta.sma(close, 22)
dev = 1.5
upperBB = basis + dev * ta.stdev(close, 22)
lowerBB = basis - dev * ta.stdev(close, 22)
// Plot the indicators
plot(ma5, color=color.blue, linewidth=2, title="MA5")
plot(ma11, color=color.red, linewidth=2, title="MA11")
plot(ma55, color=color.green, linewidth=2, title="MA55")
plot(upperBB, color=color.orange, linewidth=1, title="Upper Bollinger Band")
plot(lowerBB, color=color.orange, linewidth=1, title="Lower Bollinger Band")
// Entry conditions
longCondition = ta.crossover(ma5, ma11) and close > ma55 and close < lowerBB
shortCondition = ta.crossunder(ma5, ma11) and close < ma55 and close > upperBB
// Exit conditions
closeLongCondition = ta.crossunder(close, ma5) or close < ma55
closeShortCondition = ta.crossover(close, ma5) or close > ma55
// Execute trades
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
if (closeLongCondition)
strategy.close("Long")
if (closeShortCondition)
strategy.close("Short")
// Optional: Add Stop Loss and Take Profit (e.g., ATR-based)
atrValue = ta.atr(14)
stopLoss = atrValue * 1.5
takeProfit = atrValue * 3
strategy.exit("Exit Long", "Long", stop=close - stopLoss, limit=close + takeProfit)
strategy.exit("Exit Short", "Short", stop=close + stopLoss, limit=close - takeProfit)