Still learning... Anyone got any good examples or materials on arrays? Need to brush up on this. I think the solution to a problem at moment involves arrays.
Let's say you want to look back at an indicator and select a value based on some condition. Say for example purposes volatility value and the condition may be the highest or lowest value over a look back period. Easy enough you can use something like :
Code: Select all
input: lookback(10);
var: StdDev(0), lowest_std(0);
StdDev = StdDev(close, lookback);
lowest_std = lowest(stdDev, lookback);
However what if I want to also know the close price which corresponds to the lowest StdDev value and have this as a different variable you could plot? How do you go about this? Obtaining Y for X which has conditions , is the answer array?
thanks in advance