이 전략은 존 엘러스 (John Ehlers) 가 개발한 RSI 지표의 개선된 버전이다. 그것의 가장 큰 장점은 RSI 곡선을 평평하게 하는 동시에 RSI 곡선을 평평하게 하는 것이다.
6개의 값의 평균값 xValue을 계산합니다.
xValue 계산에 따라 상승 합계 CU23와 하락 합계 CD23。
Normalized RES값 nRes, 즉 CU23/(CU23 + CD23) 을 계산한다.
nRes와 상하의 값을 비교하여 다공소 신호를 생성한다.
선택적 역거래
신호에 따라 다중 항공 거래.
이 전략은 RSI 지표 계산 방법을 개선함으로써 곡선을 효과적으로 평평하게 하고, 잘못된 신호를 어느 정도 감소시킨다. 최적화 파라미터 설정을 하고, 다른 필터링 조건을 추가하면 전략의 성능을 더욱 향상시킬 수 있다. 그러나, 기울기형 시스템으로서, 낙후 문제를 완전히 피할 수 없다. 전체적으로, 이 전략은 간단한 신뢰할 수 있는 돌파구 시스템이며, 추가적인 최적화 연구를 할 가치가 있다.
/*backtest
start: 2023-09-13 00:00:00
end: 2023-09-19 00:00:00
period: 30m
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 20/11/2017
// This is new version of RSI oscillator indicator, developed by John Ehlers.
// The main advantage of his way of enhancing the RSI indicator is smoothing
// with minimum of lag penalty.
//
// You can change long to short in the Input Settings
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
strategy(title="Smoothed RSI Backtest ver.2")
Length = input(10, minval=1)
TopBand = input(0.8, step=0.01)
LowBand = input(0.2, step=0.01)
reverse = input(false, title="Trade reverse")
hline(TopBand, color=red, linestyle=line)
hline(LowBand, color=green, linestyle=line)
xValue = (close + 2 * close[1] + 2 * close[2] + close[3] ) / 6
CU23 = sum(iff(xValue > xValue[1], xValue - xValue[1], 0), Length)
CD23 = sum(iff(xValue < xValue[1], xValue[1] - xValue, 0), Length)
nRes = iff(CU23 + CD23 != 0, CU23/(CU23 + CD23), 0)
pos = iff(nRes > TopBand, 1,
iff(nRes < LowBand, -1, nz(pos[1], 0)))
possig = iff(reverse and pos == 1, -1,
iff(reverse and pos == -1, 1, pos))
if (possig == 1)
strategy.entry("Long", strategy.long)
if (possig == -1)
strategy.entry("Short", strategy.short)
barcolor(possig == -1 ? red: possig == 1 ? green : blue )
plot(nRes, color=blue, title="Smoothed RSI")