Connors RSI

Hi guys

Just watched all the scipting youtube video's. I am Trying to create Connors RSI - its not working as expected here is my code ( I think its the updown count): https://www.tradingview.com/wiki/Connors_RSI_(CRSI)

var1 = rsi(BARS=3);
var3 = ROC(BARS=100);
var4 = If (DU() > 0, DU(), If (DD() > 0, (DD() * -1), 0));
var2 = rsi(var4, BARS=2); var5 = (var1 + var2 + var3)/3;
Plot1 = var5;

Thanks

Thanks Mandeep. It’s always a good idea to plot each element of a formula to check that it is doing what you expect. If you think it’s the up/down count, plot VAR4 in a Show View so you can check to see what’s being calculated.

Hi Darren,

Thanks Darren - is there any other ways to code this component - not sure I'm using the right function. What I'm trying to do is is find a streak of days which are up and down (described here):
https://www.nirvanasystems.com/ultimate-indicator-connors-rsi/
(procode example) upDays = BarsSince(C <= Ref(C,-1));
updownDays = IIf(upDays > 0, upDays, IIf(downDays > 0, -downDays, 0));

Also did you have any guidance on these previous posts:
- https://forum.optuma.com/topic/correlating-into-the-future/
- https://forum.optuma.com/topic/number-searcher-tool/ (I added on top of an existing post).
- Is there any way to post a moving average of seasonality ontop of a chart using the "Get Data"function

Thanks mate - appreciate your support - sorry for the long post.

cheers

Mandeep

Hi Mandeep,

I think the DaysUp/Down is correct, and it seems the shape of the output matches your example, but the values are different. Here’s the example for GOOGL with the components broken down in each panel:

I’m not sure where the difference lays compared to your example… I’ve attached the workbook that you can save and open on your system.

I’ll have a look at the other posts, but we can’t do seasonality averages. Also, see this pinned post regarding consulting services for advanced scripting: