Bohr Band RSI 스윙 트레이딩 전략


생성 날짜: 2023-09-16 18:48:44 마지막으로 수정됨: 2023-09-16 18:48:44
복사: 2 클릭수: 737
avatar of ChaoZhang ChaoZhang
1
집중하다
1617
수행원

개요

볼띠 RSI 흔들림 거래 전략은 볼띠 지표와 상대적으로 강한 지표 ((RSI) 를 결합한 짧은 선의 흔들림 거래 전략이다. 이 전략은 볼띠의 상하 경로 사이의 가격의 흔들림 변화를 포착하여 수익을 얻는다.

원칙

우선, 이 전략은 볼띠 지표를 사용하여 가격 변동의 상하계를 분석한다. 가격이 상반도에 가까워지면 과매매하고, 하반도에 가까워지면 과매매한다.

둘째, RSI 지표와 결합하여 과매매의 강점을 판단한다. RSI 70 이상은 과매매, 30 이하는 과매매이다.

가격이 볼을 내려가면 RSI가 과매매를 표시할 때, 더 많이 하고, 가격이 볼을 올라가면 RSI가 과매매를 표시할 때, 더 많이 한다.

장점

  • 볼띠 지표는 가격의 변동 범위를 정확하게 파악할 수 있다.

  • RSI 지표는 맹목적으로 더 많은 공백을 피한다.

  • 가격 회귀 특성을 활용하여 수익을 올릴 확률이 높습니다.

  • 자주 거래하고 지속적으로 수익을 올릴 수 있습니다.

  • 다른 품종과 시간 주기에도 적용된다.

위험

  • 볼밴드 파라미터가 잘못 설정되어 있으며, 핵심 가격을 설정할 수 없습니다.

  • RSI 변수 설정이 불합리하여 잘못된 신호를 발생시킨다.

  • 은 반항력이 부족해서 스톱데이가 가동됐습니다.

  • 높은 거래 빈도에 따른 슬라이드 포인트 비용을 부담해야 합니다.

  • 변동하는 시장에서는 트렌드를 파악하기 힘들다.

어떻게 대처해야 할까요?

  • 최적화 파라미터를 사용하여 실제 변동 범위에 가깝게 볼띠를 배치한다.

  • RSI 주기를 조정하여 소음을 필터링 할 수 있습니다.

  • 모바일 스톱로스는 가격을 추적하고, 경매 손실을 줄여줍니다.

  • 거래량이 많은 품종을 선택하여 미끄러짐의 영향을 줄이십시오.

  • 트렌드 방향을 결정하는 데 도움이 되는 다른 지표들:

요약하다

볼밴드 RSI 흔들림 거래 전략은 가격의 범주 내의 양방향 변동을 효과적으로 포착할 수 있다. 변수 조정과 위험 관리를 통해 안정적인 수익을 얻을 수 있다. 이것은 추천할 만한 단선 양적 거래 전략이다.

전략 소스 코드
/*backtest
start: 2023-08-16 00:00:00
end: 2023-09-15 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
strategy("Swing trading strategy FOREX ", shorttitle="BB+RSI", overlay=true)

////////////////////////////////////////////////////////////////////////////////
// BACKTESTING RANGE
 
// From Date Inputs
fromDay = input(defval = 1, title = "From Day", minval = 1, maxval = 31)
fromMonth = input(defval = 1, title = "From Month", minval = 1, maxval = 12)
fromYear = input(defval = 2020, title = "From Year", minval = 1970)
 
// To Date Inputs
toDay = input(defval = 1, title = "To Day", minval = 1, maxval = 31)
toMonth = input(defval = 1, title = "To Month", minval = 1, maxval = 12)
toYear = input(defval = 2022, title = "To Year", minval = 1970)
 
// Calculate start/end date and time condition
startDate = timestamp(fromYear, fromMonth, fromDay, 00, 00)
finishDate = timestamp(toYear, toMonth, toDay, 00, 00)
time_cond = true
// 
// 


///////////// RSI
RSIlength = input(6,title="RSI Period Length") 
RSIoverSold = input(defval = 65, title = "RSIoverSold", minval = 1, maxval = 100)
RSIoverBought = input(defval = 35, title = "RSIoverBought", minval = 1, maxval = 100)
price = close
vrsi = rsi(price, RSIlength)



///////////// Bollinger Bands
BBlength = input(200, minval=1,title="Bollinger Period Length")
BBmult = 2 // input(2.0, minval=0.001, maxval=50,title="Bollinger Bands Standard Deviation")
BBbasis = sma(price, BBlength)
BBdev = BBmult * stdev(price, BBlength)
BBupper = BBbasis + BBdev
BBlower = BBbasis - BBdev
source = close
buyEntry = crossover(source, BBlower)
sellEntry = crossunder(source, BBupper)
plot(BBbasis, color=color.aqua,title="Bollinger Bands SMA Basis Line")
p1 = plot(BBupper, color=color.silver,title="Bollinger Bands Upper Line")
p2 = plot(BBlower, color=color.silver,title="Bollinger Bands Lower Line")
fill(p1, p2)


///////////// Colors
switch1=input(true, title="Enable Bar Color?")
switch2=input(true, title="Enable Background Color?")
TrendColor = RSIoverBought and (price[1] > BBupper and price < BBupper) and BBbasis < BBbasis[1] ? color.red : RSIoverSold and (price[1] < BBlower and price > BBlower) and BBbasis > BBbasis[1] ? color.green : na
barcolor(switch1?TrendColor:na)
bgcolor(switch2?TrendColor:na,transp=50)


///////////// RSI + Bollinger Bands Strategy
//for buy
cond1=crossover(vrsi, RSIoverSold)
cond2=crossover(source, BBlower) 
//for sell
cond3=crossunder(vrsi, RSIoverBought)
cond4=crossunder(source, BBupper)
if (not na(vrsi))

    if (cond1 and cond2 and time_cond)
        strategy.entry("RSI_BB_LONG", strategy.long, stop=BBlower, comment="LONG",alert_message = "long")
    else
        strategy.cancel(id="RSI_BB_LONG")
        
    if (cond3 and cond4 and time_cond)
        strategy.entry("RSI_BB_SHORT", strategy.short, stop=BBupper,  comment="SHORT",alert_message = "short")
        //strategy.close("RSI_BB_LONG")

    else
        strategy.cancel(id="RSI_BB_SHORT")
        
//strategy.exit("closelong", "RSI_BB_LONG" , profit = close * 0.01 / syminfo.mintick, loss = close * 0.01 / syminfo.mintick, alert_message = "closelong")
//strategy.exit("closeshort", "RSI_BB_SHORT" , profit = close * 0.01 / syminfo.mintick, loss = close * 0.01 / syminfo.mintick, alert_message = "closeshort")


//plot(strategy.equity, title="equity", color=red, linewidth=2, style=areabr)