How to check condition of RSI for previous day..on Today

Hi..

i use 5 min TF chart . I want to check if .. ON previous day ,at any point of time(during entire previous day), in 5 min TF rsi value has crossed the value of 80 . then today i want to initiate a sell .

i have gone through this thead -

quite similar query . but i am still confused . i want help on this . Thanks.

dn = DateNum();
newday = dn != Ref( dn, -1);

crss_RSI = Cross(RSI(), 80);
cs = SumSince(newday, crss_RSI);

prev_RSI_sig = ValueWhen(newday, Ref(cs, -1)) > 0;

Plot( RSI(), "RSI", colorDefault );
PlotShapes( crss_RSI * shapeUpArrow, colorGreen, 0, RSI(), 0 );
Plot( prev_RSI_sig, "prev day RSI sig > 80", colorRed, styleOwnScale );
3 Likes

Thanks a lot . @fxshrat . you solved my problem .
i often get confused refering previous days data( intraday .. like 5 min ,3 min etc)..when used to make conditions on current day..

please suggest me the method that i should use to make it visually obvious to me .. i.e plot or exploration ..so that i can understand what happening on each step at the code . suggest me any link/reading so that i can get better clarity on this subject .
i am very beginner in afl ..thank you.

Please do a favor to everyone reading this forum and type "I" with Uppercase. It really hurts my eyes when I see "i" instead. Also the beginning of sentence starts with uppercase too. Please write properly. This forum is quality place, not facebook nonsense.

5 Likes

I got your point . I will take care of it. Thanks @Tomasz .

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.