느린 RSI OB/OS 전략

저자:차오장, 날짜: 2023-12-28 18:07:48
태그:

img

전반적인 설명

느린 RSI OB/OS 전략은 RSI 곡선의 변동을 줄이기 위해 RSI의 룩백 기간을 연장함으로써 새로운 거래 기회를 열어줍니다. 이 전략은 MACD와 같은 다른 기술 지표에도 적용됩니다.

전략 논리

이 전략의 핵심 아이디어는 RSI의 룩백 기간을 기본으로 500 바로 연장하고 250 바 SMA로 RSI 곡선을 매끄럽게하는 것입니다. 이것은 RSI의 변동을 크게 줄이고 반응 속도를 느리게하여 새로운 거래 신호를 생성 할 수 있습니다.

연장된 룩백 기간은 RSI의 변동을 약화시키므로 과잉 구매 및 과잉 판매 수준에 대한 기준도 조정해야 한다. 전략은 사용자 정의 가능한 과잉 구매 라인을 52로 설정하고 과잉 판매 라인을 48로 설정한다. 부드러운 RSI가 아래에서 과잉 판매 라인을 넘어서면 긴 신호가 유발된다. 상위에서 과잉 구매 라인을 넘어서면 짧은 신호가 유발된다.

장점

  1. 장기간 새로운 거래 아이디어를 탐구함으로써 매우 혁신적
  2. 크게 잘못된 신호를 줄이고 안정성을 향상
  3. 다양한 시장에 적응할 수 있는 사용자 정의 가능한 OB/OS 기준
  4. 수익성을 높이기 위해 피라미딩을 허용

위험성

  1. 긴 기간으로 인해 단기적 기회는 놓치고
  2. 트레이딩 신호를 기다리는 동안 인내를 필요로 합니다.
  3. 부적절한 OB/OS 임계 설정은 손실을 증가시킬 수 있습니다.
  4. 함락 될 위험

해결책:

  1. 거래 빈도를 높이기 위해 적절한 기간을 단축
  2. 리스크를 다각화하기 위해 부분적인 포지션을 취하
  3. 변화하는 시장 조건에 적응하기 위해 매개 변수를 최적화
  4. 큰 손실을 피하기 위해 손실을 중지 설정

최적화 방향

  1. 가장 좋은 기간 조합을 찾기 위해 RSI 매개 변수를 최적화
  2. 다른 SMA 평평화 기간을 테스트합니다.
  3. 다양한 시장에 맞게 OB/OS 매개 변수를 최적화
  4. 단일 손실을 제어하기 위해 중지 손실 전략을 추가

결론

느린 RSI OB/OS 전략은 기간을 연장하고 변동을 억제하기 위해 SMA를 사용하여 새로운 거래 아이디어를 성공적으로 탐색했습니다. 적절한 매개 변수 조정 및 위험 통제로 전략은 안정적이고 수익성 높은 초과 수익을 얻을 수 있습니다. 결론적으로 전략은 매우 혁신적이고 유용합니다.


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


// Wilder was a very influential man when it comes to TA. However, I'm one to always try to think outside the box. 
// While Wilder recommended that the RSI be used only with a 14 bar lookback period, I on the other hand think there is a lot to learn from RSI if one simply slows down the lookback period 
// Same applies for MACD.
// Every market has its dynmaics. So don't narrow your mind by thinking my source code input levels are the only levels that work.
// Since the long lookback period weakens the plot volatility, again, one must think outside the box when trying to guage overbought and oversold levels. 

// Good luck and don't bash me if some off-the-wall FA spurned divergence causes you to lose money.
// And NO this doesn't repaint and I won't answer those who ask. 
//@version=4

strategy("SLOW RSI OB/OS Strategy", overlay=false)
price = input(ohlc4, title="Price Source")
len = input(500, minval=1, step=5,  title="RSI Length")
smoother = input(250, minval=1, step=5, title="RSI SMA")
up = rma(max(change(price), 0), len)
down = rma(-min(change(price), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
EmaRSI = ema(rsi,smoother)
plot(EmaRSI, title="EmaRSI", style=line, linewidth=1, color=yellow)


OB = input(52, step=0.1)
OS = input(48, step=0.1)
hline(OB, linewidth=1, color=red)
hline(OS,linewidth=1, color=green)
hline(50,linewidth=1, color=gray)


long = change(EmaRSI) > 0 and EmaRSI <= 50 and crossover(EmaRSI, OS)
short = change(EmaRSI) < 0 and EmaRSI >= 50 and crossunder(EmaRSI, OB)


strategy.entry("Long", strategy.long, when=long) //_signal or long) //or closeshort_signal)
strategy.entry("Short", strategy.short, when=short) //_signal or short) // or closelong_signal)

// If you want to try to play with exits you can activate these!

//closelong = crossunder(EmaRSI, 0) //or crossunder(EmaRSI, OS)
//closeshort = crossover(EmaRSI, 0) //or crossover(EmaRSI, OB)

//strategy.close("Long", when=closelong)
//strategy.close("Short", when=closeshort)




더 많은