Hi everyone,
Which command should I use to get the value from 3 weeks ago for example from my indicator?
For example : close(3) return the close value 3 weeks ago.
Thanks. I tried but not working.
Hi Ronen
Close[3] (3 in square brackets) will give you the value of weekly close from 3 weeks ago but only if you are using a 1 Week Timeframe.
Cheers
GraHal
Yes, i know that.
It was just example.
I need help with a command (same as close [Nweek] ) that return the value of previous week from my personal indicator.
>> Please update your country flag in your profile. Thank you 🙂 <<
Please post your code to get a more precise answer to your query.
how can i get the previous value (R) from the code below ?
AD = AccumDistr(close)
R = AD - Average[30](AD)
return R
or this code instead:
return R[1]
The number under brackets is the quantity of bars in the past you want to get the variable’s value from.
ahh 🙂
I can never remember the difference between () and []