Ricorichie
New member
I've been searching the forum for a while now and have come up short.
I'm working on building a watchlist column. I'm trying to get the range of each weekly candle going back 10 weeks. Using GetWeek I can get the range for the current week but it won't allow me to go back in time any further. I must be doing something wrong, but can't put my finger on it. Please help!!
This line works and returns the range for the current week that just ended:
plot W8 = if GetWeek() then high-low else Double.NaN;
While testing I try to change to this:
plot W7 = if GetWeek() [7] then high-low else Double.NaN;
Thinking this to be the previous week's number to get the prior week's range, but it still returns the current week's range.
I'm sure I'm making a mistake somewhere, I just can't see it. Maybe I should be using something other than GetWeek.
R
I'm working on building a watchlist column. I'm trying to get the range of each weekly candle going back 10 weeks. Using GetWeek I can get the range for the current week but it won't allow me to go back in time any further. I must be doing something wrong, but can't put my finger on it. Please help!!
This line works and returns the range for the current week that just ended:
plot W8 = if GetWeek() then high-low else Double.NaN;
While testing I try to change to this:
plot W7 = if GetWeek() [7] then high-low else Double.NaN;
Thinking this to be the previous week's number to get the prior week's range, but it still returns the current week's range.
I'm sure I'm making a mistake somewhere, I just can't see it. Maybe I should be using something other than GetWeek.
R