Is there a possibility to refer to the ADX of x days back? So I maybe want to know what the ADX[14] was last friday. Can this be done?
Just save the ADX value in a variable and if current day is Friday?
Yes, I thought about this option. Thought there maybe was another way but thank you. I will to it like this.
I guess you ask because you might think the [14] syntax is “taken” by nature of adx[], and can’t use the [x] on top of this to look back x days before, but PRT language allows you to cumulate both sets of brackets, so… adx[14][x] works (as long as your x is a positive integer of course)
Hmm but if I want to have this condition rolling, say: Compare adx[14] with adx[14] x bars ago. It is not so easy to save the value x bars ago in a variable. Any idea Nicolas?
I got an idea. I can put a 1 period average on the ads and then refer to the average x periods back. This should work, shouldn’t it?
It worked with a 1-period average but Noobywans solutions seems more elegant. I thought cumulating brackets wasn’t allowed. Thanks for this advice!