Bonjour Nicolas et bonjour à tous,
Quelqu’un aurait-il la possibilité et l’extrême gentillesse de convertir cet sorte de RSI (Connors) issu de TradingView?
Je vous remercie par avance.
Vous trouverez ci dessous le code et une capture.
/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)
src = close,
//RSI CODE
up = rma(max(change(src), 0), 2)
down = rma(-min(change(src), 0), 2)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
//Criteria for Moving Avg rules
ma5 = sma(close,5)
ma200= sma(close, 200)
//Rule for RSI Color
col = close > ma200 and close < ma5 and rsi < 10 ? lime : close < ma200 and close > ma5 and rsi > 90 ? red : silver
plot(rsi, title="RSI", style=line, linewidth=4,color=col)
plot(100, title="Upper Line 100",style=line, linewidth=3, color=aqua)
plot(0, title="Lower Line 0",style=line, linewidth=3, color=aqua)
band1 = plot(90, title="Upper Line 90",style=line, linewidth=3, color=aqua)
band0 = plot(10, title="Lower Line 10",style=line, linewidth=3, color=aqua)
fill(band1, band0, color=silver, transp=90)
Personne ne peut m’aider pour cet indicateur? :/
bon après-midi, je pense que ce serait quelque chose comme ça :
//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)
//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 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"
Désolé, il me manquait deux lignes…
//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)
//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"
Bonjour Bolsatrilera,
Un grand merci pour ton aide apportée c’est exactement ce que je recherchais 🙂
On peut peut-être désormais mettre le code dans la librairie des indicateurs.
Merci beaucoup.