If I initiate a loop to extract the value of a particular indicator (for arguments sake ATR) how do I extract the atr value of the last x bars
for instance
for (int i =1; i<=Bars; i++)
{
latestatr = iATR(NULL,0,5,0);
Alert (latestatr);
}
For instance i know if i wanted the high of the last xbar it would be high[x] .... but how do you extract the value of an indicator for x bar? I tried iATR (x) or iATR [x] ... but to no avail??
Cheers
D_T
for instance
for (int i =1; i<=Bars; i++)
{
latestatr = iATR(NULL,0,5,0);
Alert (latestatr);
}
For instance i know if i wanted the high of the last xbar it would be high[x] .... but how do you extract the value of an indicator for x bar? I tried iATR (x) or iATR [x] ... but to no avail??
Cheers
D_T