So I'm trying to create a filter in which the STDEV should be smaller than the MA on array.
I mean, i can just drag it into it on mtf, but it is for an expert.
this is what i got:
y = iBarShift(NULL,1,Time[0]);
double sdev = iStdDev(NULL,0,100,0,0,0,y);
sdevarray[y] = sdev;
double marray = iMAOnArray(sdevarray,0,1000,0,MODE_SMA,y);
later i just use a condition like "if (sdev < marray)" and so on.
it doesnt work "integer expression expected" for the y.
Can anyone help?
I mean, i can just drag it into it on mtf, but it is for an expert.
this is what i got:
y = iBarShift(NULL,1,Time[0]);
double sdev = iStdDev(NULL,0,100,0,0,0,y);
sdevarray[y] = sdev;
double marray = iMAOnArray(sdevarray,0,1000,0,MODE_SMA,y);
later i just use a condition like "if (sdev < marray)" and so on.
it doesnt work "integer expression expected" for the y.
Can anyone help?