devilian1899:
Hi all,
Hi all,
I'm on a verge of bilding multi pairs EA and I found some problem.
I've try to trace the problem and checking some codes but I'm, stuck on this.
Is anybody know why ma1 and ma2 are resulting different?
Thanks for your help
int MAPeriod=100; int MAMethod=0; double clos[500]; ArraySetAsSeries(clos,true); for(int k=0;k<500;k++) { clos[k]=Close[k]; } double ma1=iMAOnArray(clos,0,MAPeriod,0,MAMethod,1); double ma2=iMA(Symbol(),0,MAPeriod,0,MAMethod,PRICE_CLOSE,1);
Without the array being AsSeries, you are asking for the MA(1) so the MAoa only has clos[0] and clos[1] to work with.
Oh thank you.. forgot to add that part.
honest_knave:
I see, thanks.
WHRoeder:
Without the array being AsSeries, you are asking for the MA(1) so the MAoa only has clos[0] and clos[1] to work with.
Without the array being AsSeries, you are asking for the MA(1) so the MAoa only has clos[0] and clos[1] to work with.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I'm on a verge of bilding multi pairs EA and I found some problem.
I've try to trace the problem and checking some codes but I'm, stuck on this.
Is anybody know why ma1 and ma2 are resulting different?
Thanks for your help