빠른 RSI 전략 분석

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

img

전략 이름

극심한 양방향 RSI 트렌드 전략

전반적인 설명

이 전략은 RSI 지표를 사용하여 가격 트렌드를 빠르게 결정합니다. 단기 가격 수준을 더 빠르게 파악하는 장기 및 단기 기능이 있습니다.

전략 원칙

이 전략은 가격의 과잉 구매 및 과잉 판매 상태를 판단하기 위해 향상된 RSI 지표를 사용하여 소음을 줄이기 위해 촛불 몸 필터링과 결합합니다. RSI가 과잉 구매 또는 과잉 판매 구역에 있고 촛불 몸 크기가 평균 몸 크기의 1/3보다 크면 길거나 짧습니다. 촛불이 방향을 뒤집고 RSI가 거래 신호가 발생하면 더 안전한 수준으로 다시 끌어당길 때 포지션을 닫습니다.

이점 분석

이 전략은 빠르게 반응하고 더 빠른 단기 트렌드를 포착 할 수 있습니다. 한편으로, 몸 필터는 소음을 줄이고 거짓 브레이크에 의해 오해되는 것을 피하는 데 도움이됩니다. 그것은 높은 변동성 제품에 적합하며 더 높은 수익을 얻을 수 있습니다.

위험 분석

이 전략은 가격 변화에 매우 민감하며, 시장에서 잘못된 신호에 의해 쉽게 잘못 인도됩니다. 또한, 높은 변동성 시장에서 중지 손실이 자주 발생 할 수 있습니다. 우리는 중지 손실 범위를 느슨하게하고 잘못된 신호 확률을 낮추기 위해 RSI 매개 변수를 최적화 할 수 있습니다.

최적화 방향

우리는 전략을 최적화하고 최상의 매개 변수 조합을 찾기 위해 지표의 다른 주기적 매개 변수를 테스트 할 수 있습니다. 또한 거북이 거래 규칙과 같은 다른 지표를 통합하면 신호 필터링에 더 도움이 될 수 있습니다. 기계 학습 방법을 통해 더 나은 RSI 임계치를 훈련하는 것도 가치가있는 시도가 될 수 있습니다.

요약

전체적으로, 이것은 효율적이고 반응적인 단기 전략입니다. 일부 매개 변수 및 모델 최적화와 함께 안정성과 수익성을 더욱 향상시킬 잠재력을 가지고 있습니다. 양자 상인들이 계속 연구하고 추적 할 가치가 있습니다.


/*backtest
start: 2023-11-03 00:00:00
end: 2023-12-03 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

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

//Settings
needlong = input(true, defval = true, title = "Long")
needshort = input(true, defval = true, title = "Short")
rsiperiod = input(7, defval = 7, minval = 2, maxval = 50, title = "RSI Period")
limit = input(30, defval = 30, minval = 1, maxval = 100, title = "RSI limit")
rsisrc = input(close, defval = close, title = "RSI Source")
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), rsiperiod)
fastdown = rma(-min(change(rsisrc), 0), rsiperiod)
fastrsi = fastdown == 0 ? 100 : fastup == 0 ? 0 : 100 - (100 / (1 + fastup / fastdown))
uplimit = 100 - limit
dnlimit = limit

//Body
body = abs(close - open)
emabody = ema(body, 30) / 3

//Signals
bar = close > open ? 1 : close < open ? -1 : 0
up = bar == -1 and fastrsi < dnlimit and body > emabody
dn = bar == 1 and fastrsi > uplimit and body > emabody
exit = ((strategy.position_size > 0 and fastrsi > dnlimit) or (strategy.position_size < 0 and fastrsi < uplimit)) and body > emabody

//Trading
if up
    strategy.entry("Long", strategy.long, needlong == false ? 0 : na, when=(time > timestamp(fromyear, frommonth, fromday, 00, 00) and time < timestamp(toyear, tomonth, today, 00, 00)))

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

더 많은