빠른 스칼핑 RSI 전환 전략 v1.7

저자:차오장, 날짜: 2023-12-22 15:10:40
태그:

img

전반적인 설명

노로의 패스트 스칼핑 RSI 스위칭 전략은 RSI 지표를 사용하여 과잉 구매 및 과잉 판매 기회를 식별하는 양적 거래 전략입니다. 이 전략은 또한 촛불 패턴, 이동 평균 필터 및 위험을 제어하기 위한 스톱 로스 방법을 포함합니다.

이 전략의 주요 구성 요소는 다음과 같습니다.

  1. 빠른 RSI 지표: 과잉 구매 및 과잉 판매 수준을 식별
  2. 촛불 패턴: 트렌드 방향을 결정하는 데 도움이 됩니다.
  3. 이동 평균 필터: 잘못된 신호를 피하기 위해 SMA를 사용
  4. 스톱 로스 메커니즘: RSI 한도를 기반으로 스톱 로스를 구현합니다.

전략 논리

노로의 패스트 스칼핑 RSI 스위칭 전략은 주로 다음과 같은 거래 신호를 식별합니다.

  1. 빠른 RSI 과잉 구매/ 과잉 판매 신호: 빠른 RSI가 상위 한도를 넘거나 하위 한도를 넘을 때 거래 신호가 생성됩니다.

  2. 촛불 신호: 몸의 크기와 방향과 같은 촛불 매개 변수는 트렌드를 결정하고 빠른 RSI 신호를 보완하는 데 사용됩니다.

  3. SMA 필터 신호: SMA 방향은 잘못된 파업 신호를 필터합니다.

  4. 스톱 로스 신호: 급속한 RSI가 상위 한계 이상 또는 하위 한계 아래로 다시 넘어가면 포지션은 닫습니다.

특히, 이 전략은 빠른 RSI의 과잉 구매 및 과잉 판매 구역을 기반으로 거래 기회를 식별합니다. 빠른 RSI가 하위 한도를 넘어서면 과잉 판매 상태가 나타납니다. 상위 한도를 넘어서면 과잉 구매 상태가 나타납니다.

소음을 피하기 위해 다음의 추가 조건이 추가됩니다.

  1. 촛불 몸집 크기: 더 큰 촛불 몸집은 더 강한 추세를 나타냅니다.
  2. 촛불 방향: 상승 또는 하락 추세를 결정합니다.
  3. SMA 필터: 잘못된 브레이크오웃 신호를 필터링합니다.
  4. 스톱 로스: 빠른 RSI가 한계를 넘어서면 거래를 종료합니다

따라서 이 전략은 빠른 RSI, 촛불, 이동 평균 및 스톱 로스를 결합하여 거래 신호를 생성합니다.

장점

이 전략의 장점은 다음과 같습니다.

  1. 빠른 RSI는 민감합니다: 과잉 구매/ 과잉 판매 기회를 빠르게 포착합니다.
  2. 촛불 & MA 필터: 잘못된 신호를 피합니다.
  3. 자동 스톱 로스: 위험을 효과적으로 제어합니다.
  4. 스칼핑에 적합합니다: 짧은 시간 프레임으로 잘 작동합니다. 예를 들어 1H, 30M
  5. 최적화하기 쉽습니다: 다른 시장에 대한 매개 변수를 조정 할 수 있습니다.

위험성

또한 고려해야 할 몇 가지 위험이 있습니다.

  1. 연속 스톱 로스: 다른 시장에서 더 많은 스톱 로스 신호가 발생할 수 있습니다.
  2. 매개 변수 최적화 필요: 매개 변수는 서로 다른 쌍과 시간 프레임에 조정해야합니다
  3. 모든 손실을 피할 수 없습니다: 적시에 손실을 중단해도 일부 손실이 발생합니다.

다음과 같은 최적화 방법은 위험을 완화하는 데 도움이 될 수 있습니다.

  1. 빠른 RSI 매개 변수를 최적화: 잘못된 신호를 줄여
  2. 스톱 로스 배치 최적화: 단일 거래 손실 크기를 제어
  3. 포지션 크기를 추가합니다. 여러 거래에 위험을 분산합니다.

최적화 방향

이 전략을 더 이상 최적화 할 수있는 몇 가지 방법은 다음과 같습니다.

  1. 이윤 취득 출입: 이윤 목표를 달성 할 때 부분적 이윤을 취득합니다.
  2. 리스크 관리 강화: 리스크의 다양화를 위해 포지션 크기의 규칙을 포함
  3. 매개 변수 조정: 시간 프레임에 걸쳐 매개 변수 조정의 테스트 효과
  4. 기계 학습: 알고리즘을 사용하여 시간이 지남에 따라 매개 변수를 자동으로 최적화합니다.
  5. 견고성 테스트: 더 많은 기호 쌍에서 전략 성능을 평가

이윤 취득, 위험 관리, 매개 변수 최적화, 기계 학습 및 안정성 테스트를 통합함으로써 전략의 안정성이 크게 향상될 수 있습니다.

결론

요약하자면, 노로의 패스트 스칼핑 RSI 스위칭 전략은 빠른 RSI 지표와 보충 촛불 분석을 결합하여 과반 구매 및 과반 판매 거래 기회를 식별합니다. 빠른 신호 응답 시간, 최적화 용이성 및 통합 스톱 로스 모듈으로,이 단기 거래 전략은 추가 기계 학습 및 매개 변수 조정 후에 긍정적 인 결과를 창출 할 수있는 강력한 잠재력을 가지고 있습니다.


/*backtest
start: 2023-12-14 00:00:00
end: 2023-12-18 00:00:00
period: 15m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//Noro
//2018

//@version=2
strategy(title = "Noro's Fast RSI Strategy v1.7", shorttitle = "Fast RSI str 1.7", overlay = true)

//Settings
needlong = input(true, defval = true, title = "Long")
needshort = input(true, defval = true, title = "Short")
usemar = input(false, defval = false, title = "Use Martingale")
capital = input(100, defval = 100, minval = 1, maxval = 10000, title = "Capital, %")
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
profit = exit ? ((strategy.position_size > 0 and close > strategy.position_avg_price) or (strategy.position_size < 0 and close < strategy.position_avg_price)) ? 1 : -1 : profit[1]
mult = usemar ? exit ? profit == -1 ? mult[1] * 2 : 1 : mult[1] : 1
lot = strategy.position_size == 0 ? strategy.equity / close * capital / 100 * mult : lot[1]

if up1 or up2 or up3
    if strategy.position_size < 0
        strategy.close_all()
        
    strategy.entry("Long", strategy.long, needlong == false ? 0 : lot)

if dn1 or dn2 or dn3
    if strategy.position_size > 0
        strategy.close_all()
        
    strategy.entry("Short", strategy.short, needshort == false ? 0 : lot)
    
if time > timestamp(toyear, tomonth, today, 23, 59) or exit
    strategy.close_all()

더 많은