adaptation of a Tradingview code at the request of the French forum :
based on Larry Connors’ RSI-2 system.
The RSI-2 Strategy is designed to use on Daily Bars, however it is a short term trading strategy. The average length of time in a trade is just over 2 days.
REM CM-RSI
//Created by ChrisMoody
//Based on Larry Connors RSI-2 Strategy - Lower RSI
//study(title="_CM_RSI_2_Strat_Low", shorttitle="_CM_RSI_2_Strategy_Lower", overlay=false)
// on platform Tradingview
//adapted by platform Prorealtime v10.3 by bolsatrilera
//RSI CODE
up =WilderAverage[2](max(close-close[1],0))
down =WilderAverage[2](-min(close-close[1], 0))
rs = 100 - (100 / (1 + up / down))
//Criteria for Moving Avg rules
ma5 = average[5](close)
ma200= average[200](close)
//Rule for RSI Color
if close > ma200 and close < ma5 and rs < 10 then
r=0
g=255
b=0
elsif close < ma200 and close > ma5 and rs > 90 then
r=255
g=0
b=0
else
r=192
g=192
b=192
endif
return 100 coloured(0,255,255)style(line,3)as "Upper Line 100",0 coloured(0,255,255)style(line,3)as "Lower Line 0", 90 coloured(0,255,255)style(line,3)as "Upper line 90",10 coloured(0,255,255)style(line,3)as "Lower Line 10",rs coloured(r,g,b) style(line,2) as "rsi"