I am sure somebody can probably sort this in a heartbeat, but I seem to be stuck on an array issue. I have a global variable configured like this:
double gdaRSI[];
I am trying to populate that array like this (in int start(){}):
iCountedBars=IndicatorCounted();
if(iCountedBars < 0) return (-1);
if(iCountedBars>0) iCountedBars--;
iNewBars=MathMin(Bars-iCountedBars, Bars-1);
for(i=iNewBars-1; i>=0; i--) {
gdaRSI[i] = iRSI(NULL,0,13,PRICE_CLOSE,i);
Print("From Func: "+i+" "+gdaRSI[i]);
}
but the array doesn't appear to populate, in the journal I just see 157 entries of zero. I have tested the iRSI(NULL,0,13,PRICE_CLOSE,i); part of it and it's fine.
Any ideas anybody ? I have spent 5 hours trying to figure this out which makes me think its something stupid.
Thanks in advance.
double gdaRSI[];
I am trying to populate that array like this (in int start(){}):
iCountedBars=IndicatorCounted();
if(iCountedBars < 0) return (-1);
if(iCountedBars>0) iCountedBars--;
iNewBars=MathMin(Bars-iCountedBars, Bars-1);
for(i=iNewBars-1; i>=0; i--) {
gdaRSI[i] = iRSI(NULL,0,13,PRICE_CLOSE,i);
Print("From Func: "+i+" "+gdaRSI[i]);
}
but the array doesn't appear to populate, in the journal I just see 157 entries of zero. I have tested the iRSI(NULL,0,13,PRICE_CLOSE,i); part of it and it's fine.
Any ideas anybody ? I have spent 5 hours trying to figure this out which makes me think its something stupid.
Thanks in advance.