노로의 빠른 RSI 돌파구 전략

저자:차오장, 날짜: 2023-09-12 11:40:02
태그:

이 기사에서는 Noro의 빠른 RSI 돌파구 전략의 논리를 상세히 설명하고 거래 신호가 어떻게 생성되는지 설명하고 이 전략의 장점과 잠재적 위험을 분석합니다.

I. 전략 개요

이 전략은 주로 RSI 지표를 사용하여 촛불 필터링과 보조 판단으로 min/max 돌파구와 결합하여 거래 신호를 생성하여 완전한 긴/단결 시스템을 형성합니다. 전략 이름은 Noro의 빠른 RSI 돌파구 전략입니다.

II. 전략 세부 사항

  1. 빠른 RSI 설정

이 전략은 긴 7 빠른 RSI를 사용하여 빠른 RSI 변동을 통해 시장 트렌드의 신호를 포착합니다. 또한 RSI가 위반되면 신호를 유발하기 위해 70 및 30의 상하계와 하계도 설정됩니다.

  1. 촛불 필터링

이 전략은 촛불체 크기 sma를 사용하여 RSI 신호를 필터링하고, 5 일 평균 체 크기보다 큰 촛불체 크기의 RSI 신호를만 고려하여 윙사 (whipsaws) 를 피합니다.

  1. 최소/최대 돌파구

이 전략은 최근 mmbars에서 min/max 돌파구가 발생했는지 확인하고, RSI 수준과 결합하여 최하위 반전과 최상위 분단을 결정합니다.

  1. 거래 신호 요약

긴 신호: RSI가 30 이하로 넘어가고, 몸 크기가 평균 몸 크기를 넘어서고,

짧은 신호: RSI가 70을 넘고, 몸의 크기가 평균 몸의 크기를 넘고, 최대 저항이 끊어집니다.

출구 신호: RSI가 지점의 반대 방향으로 한계를 다시 넘을 때

III. 전략의 장점

  1. 최적화된 RSI 매개 변수는 트렌드 변화를 빠르게 파악합니다.

  2. 촛대와 min/max을 결합하면 불필요한 윙사브를 방지할 수 있습니다.

  3. 스톱 로스 메커니즘은 RSI가 한계를 넘으면 종료됩니다.

IV. 전략의 위험

  1. RSI는 잘못된 신호에 유연하고, 보조 확인이 필요합니다.

  2. 백테스트 과도한 적합성 위험. 최적화된 매개 변수는 특정 시장 기간에만 적합 할 수 있습니다.

  3. 스톱 로스 메커니즘은 너무 기계적일 수 있고, 단 한번의 스톱 로스에서 큰 손실을 제어할 수 없습니다.

결론

이 전략은 강력한 트렌드를 따르는 여러 기술적 지표를 통합합니다. 그러나 백테스트 오버 피팅 및 스톱 손실의 위험은 유의해야하며 라이브 성능을 신중하게 평가해야합니다. 라이브 거래에 권장되는 매개 변수와 포지션 사이징의 세밀한 조정.


/*backtest
start: 2022-09-11 00:00:00
end: 2023-01-11 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//Noro
//2018

//@version=3
strategy(title = "Noro's Fast RSI Strategy v1.6", shorttitle = "Fast RSI str 1.6", overlay = true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, pyramiding = 10)

//Settings
needlong = input(true, defval = true, title = "Long")
needshort = input(true, defval = true, title = "Short")
usersi = input(true, defval = true, title = "Use Fast RSI Strategy")
usemm = input(true, defval = true, title = "Use Min/Max Strategy")
usebc = input(true, defval = true, title = "Use BarColor Strategy")
usesma = input(false, defval = false, title = "Use SMA Filter")
smaperiod = input(20, defval = 20, minval = 2, maxval = 1000, title = "SMA Filter Period")
fast = input(7, defval = 7, minval = 2, maxval = 50, title = "Fast RSI Period")
limit = input(30, defval = 30, minval = 1, maxval = 100, title = "RSI limit")
rsisrc = input(close, defval = close, title = "RSI Price")
rsibars = input(1, defval = 1, minval = 1, maxval = 20, title = "RSI Bars")
mmbars = input(1, defval = 1, minval = 1, maxval = 5, title = "Min/Max Bars")
showsma = input(false, defval = false, title = "Show SMA Filter")
showarr = input(false, defval = false, title = "Show Arrows")
fromyear = input(2018, defval = 2018, minval = 1900, maxval = 2100, title = "From Year")
toyear = input(2100, defval = 2100, minval = 1900, maxval = 2100, title = "To Year")
frommonth = input(01, defval = 01, minval = 01, maxval = 12, title = "From Month")
tomonth = input(12, defval = 12, minval = 01, maxval = 12, title = "To Month")
fromday = input(01, defval = 01, minval = 01, maxval = 31, title = "From day")
today = input(31, defval = 31, minval = 01, maxval = 31, title = "To day")

//Fast RSI
fastup = rma(max(change(rsisrc), 0), fast)
fastdown = rma(-min(change(rsisrc), 0), fast)
fastrsi = fastdown == 0 ? 100 : fastup == 0 ? 0 : 100 - (100 / (1 + fastup / fastdown))

//Limits
bar = close > open ? 1 : close < open ? -1 : 0
uplimit = 100 - limit
dnlimit = limit

//RSI Bars
upsignal = fastrsi > uplimit ? 1 : 0
dnsignal = fastrsi < dnlimit ? 1 : 0
uprsi = sma(upsignal, rsibars) == 1
dnrsi = sma(dnsignal, rsibars) == 1

//Body
body = abs(close - open)
abody = sma(body, 10)

//MinMax Bars
min = min(close, open)
max = max(close, open)
minsignal = min < min[1] and bar == -1 and bar[1] == -1 ? 1 : 0
maxsignal = max > max[1] and bar == 1 and bar[1] == 1 ? 1 : 0
mins = sma(minsignal, mmbars) == 1
maxs = sma(maxsignal, mmbars) == 1

//SMA Filter
sma = sma(close, smaperiod)
colorsma = showsma ? blue : na
plot(sma, color = colorsma, linewidth = 3)

//Signals
up1 = bar == -1 and (strategy.position_size == 0 or close < strategy.position_avg_price) and dnrsi and body > abody / 5 and usersi
dn1 = bar == 1 and (strategy.position_size == 0 or close > strategy.position_avg_price) and uprsi and body > abody / 5 and usersi
up2 = mins and (close > sma or usesma == false) and fastrsi < 70 and usemm
dn2 = maxs and (close < sma or usesma == false) and fastrsi > 30 and usemm 
up3 = sma(bar, 2) == -1 and usebc
dn3 = sma(bar, 2) == 1 and usebc
exit = ((strategy.position_size > 0 and fastrsi > dnlimit and bar == 1) or (strategy.position_size < 0 and fastrsi < uplimit and bar == -1)) and body > abody / 2

//Arrows
col = exit ? black : up1 or dn1 ? blue : up2 or dn2 ? red : na
needup = up1 or up2
needdn = dn1 or dn2
needexitup = exit and strategy.position_size < 0
needexitdn = exit and strategy.position_size > 0
plotarrow(showarr and needup ? 1 : na, colorup = blue, colordown = blue, transp = 0)
plotarrow(showarr and needdn ? -1 : na, colorup = blue, colordown = blue, transp = 0)
plotarrow(showarr and needexitup ? 1 : na, colorup = black, colordown = black, transp = 0)
plotarrow(showarr and needexitdn ? -1 : na, colorup = black, colordown = black, transp = 0)

//Trading
if up1 or up2 or up3
    if strategy.position_size < 0
        strategy.close_all()
        
    strategy.entry("Long", strategy.long, needlong == false ? 0 : na, when=(time > timestamp(fromyear, frommonth, fromday, 00, 00) and time < timestamp(toyear, tomonth, today, 23, 59)))

if dn1 or dn2 or dn3
    if strategy.position_size > 0
        strategy.close_all()
        
    strategy.entry("Short", strategy.short, needshort == false ? 0 : na, when=(time > timestamp(fromyear, frommonth, fromday, 00, 00) and time < timestamp(toyear, tomonth, today, 23, 59)))
    
if time > timestamp(toyear, tomonth, today, 23, 59) or exit
    strategy.close_all()

더 많은