
이 전략은 상대적으로 약한 지수 ((RSI) 를 기반으로 하는 자기 적응 거래 시스템으로 RSI 지표의 오버 바이 오버 소드 영역을 모니터링하여 시장 동력의 변화를 포착한다. 이 시스템은 지능적인 포지션 관리 메커니즘을 통합하고 있으며, 다단계 스톱 스톱 손실 제어와 자동 청산 포지션 기능을 포함하고 있으며, 이는 건전한 위험-수익 비율을 달성하기 위해 고안되었다.
전략의 핵심은 RSI 지표에 기반한 오버 바이 오버 셀 신호이며, 여러 가지 거래 조건을 결합합니다:
이 전략은 RSI 지표를 통해 시장 동력의 변화를 포착하고, 완벽한 위험 관리 시스템과 함께, 완전히 자동화된 거래 시스템을 구현한다. 제한이 있지만, 제안된 최적화 방향의 개선 후, 더 안정적인 거래 성능을 달성할 것으로 기대된다. 전략의 핵심 장점은 시스템의 완전성과 자동화 정도에 있으며, 기본 프레임워크로 추가 개발 및 최적화에 적합하다.
/*backtest
start: 2024-11-04 00:00:00
end: 2024-11-11 00:00:00
period: 10m
basePeriod: 10m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Harmony Signal Flow By Arun", overlay=true)
// RSI settings
rsiLength = 14
rsiSource = close
rsiValue = ta.rsi(rsiSource, rsiLength)
// Define RSI levels
buyLevel = 30
sellLevel = 70
// Buy signal: RSI crosses above 30
buyCondition = ta.crossover(rsiValue, buyLevel)
// Sell signal: RSI crosses below 70
sellCondition = ta.crossunder(rsiValue, sellLevel)
// Ensure only one order at a time
if (strategy.position_size == 0) // No open positions
if (buyCondition)
strategy.entry("Buy", strategy.long)
else if (sellCondition)
strategy.entry("Sell", strategy.short)
// Stop-loss and target conditions
var float stopLossBuy = na
var float targetBuy = na
var float stopLossSell = na
var float targetSell = na
if (strategy.position_size > 0) // If there's an open buy position
stopLossBuy := strategy.position_avg_price - 100 // Set stop-loss for buy
targetBuy := strategy.position_avg_price + 150 // Set target for buy
if (close <= stopLossBuy)
strategy.close("Buy", comment="Stoploss Hit")
else if (close >= targetBuy)
strategy.close("Buy", comment="Target Hit")
if (strategy.position_size < 0) // If there's an open sell position
stopLossSell := strategy.position_avg_price + 100 // Set stop-loss for sell
targetSell := strategy.position_avg_price - 150 // Set target for sell
if (close >= stopLossSell)
strategy.close("Sell", comment="Stoploss Hit")
else if (close <= targetSell)
strategy.close("Sell", comment="Target Hit")
// Close all positions by 3:25 PM
if (hour(timenow) == 15 and minute(timenow) == 25)
strategy.close_all(comment="Close all positions at 3:25 PM")
// Plot buy/sell signals on the chart
plotshape(buyCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Plot RSI and levels
hline(buyLevel, "Buy Level", color=color.green)
hline(sellLevel, "Sell Level", color=color.red)
plot(rsiValue, "RSI", color=color.blue)