
이 전략은 부린띠 지표에 기반한 동적 거래 시스템으로, 주로 가격과 부린띠의 교차로 거래 신호를 생성하며, 부린띠 경계와 접촉하는 높은 낮은 점과 함께 동적 출구 조건을 결합합니다. 이 전략은 부린띠의 가격 변동 영역으로서의 특성을 최대한 활용하여, 평균에서 벗어나면 거래 기회를 찾고, 동적 출구 장치를 통해 수익을 보호하고 위험을 제어합니다.
전략의 핵심 논리에는 다음과 같은 핵심 요소가 포함됩니다.
이 전략은 브린 띠 지표를 통해 명확한 거래 논리와 위험 관리 메커니즘을 갖춘 완전한 거래 시스템을 구축한다. 약간의 잠재적인 위험이 있지만, 적절한 파라미터 최적화와 전략 개선으로 다양한 시장 환경에서 그 성능을 더욱 향상시킬 수 있다. 전략의 핵심 장점은 시장의 변동에 동적으로 적응하는 특성으로, 이는 특히 변동성이 강한 시장 환경에 적합하다.
/*backtest
start: 2024-02-22 00:00:00
end: 2025-02-19 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//
// #######################################
// # #
// # Taexion #
// # #
// #######################################
//
//@version=6
strategy("Bollinger Strategy: Close at Band Touch v6", overlay=true, initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=1000)
// Bollinger Bands parameters
length = input.int(10, title="Bollinger Period")
mult = input.float(2.0, title="Multiplier", step=0.1)
basis = ta.sma(close, length)
dev = mult * ta.stdev(close, length)
upper = basis + dev
lower = basis - dev
// Plotting the bands
plot(basis, color=color.blue, title="Base")
p1 = plot(upper, color=color.red, title="Upper Band")
p2 = plot(lower, color=color.green, title="Lower Band")
fill(p1, p2, color=color.new(color.blue, 90), title="Band Fill")
// Entry signals
longEntry = ta.crossover(close, lower)
shortEntry = ta.crossunder(close, upper)
if longEntry
strategy.entry("Long", strategy.long)
if shortEntry
strategy.entry("Short", strategy.short)
// Exit conditions based on touching the bands
// If in a long position and the candle's high touches or exceeds the upper band, close long.
if strategy.position_size > 0 and high >= upper
strategy.close("Long")
// If in a short position and the candle's low touches or falls below the lower band, close short.
if strategy.position_size < 0 and low <= lower
strategy.close("Short")