Try this:
double a[10000];
...
If you want to use "a" as array and not as buffer, than the logic of handling it should be changed (metatrader does not treat them equally). The simplest is to use it as buffer (attached here) if you have buffers to spare
PS: change th way your loops work too. The for(i=0; i <= Bars; i++) and for(i=0; i <= Bars-1; i++)modes calculate every bar on every tick and it is not necessary
If you want to use "a" as array and not as buffer, than the logic of handling it should be changed (metatrader does not treat them equally). The simplest is to use it as buffer (attached here) if you have buffers to spare PS: change th way your loops work too. The for(i=0; i <= Bars; i++) and for(i=0; i <= Bars-1; i++)modes calculate every bar on every tick and it is not necessary
wow, thanks for the tip
second question is, why do the loops never work in EA's but when called as custom indicator works well.
wow, thanks for the tip second question is, why do the loops never work in EA's but when called as custom indicator works well.
simple, for loops to work on ea must of condition. if it matched the condition or not. if so do something. you have to look though the code, the to see what condition need to put in there
Petor
If you want to use "a" as array and not as buffer, than the logic of handling it should be changed (metatrader does not treat them equally). The simplest is to use it as buffer (attached here) if you have buffers to spare PS: change th way your loops work too. The for(i=0; i <= Bars; i++) and for(i=0; i <= Bars-1; i++)modes calculate every bar on every tick and it is not necessary
Thank You very much, Mladen! The "Maxima" is wonderful. Thank You!
What does this indicator do? I mean, I can see how it should be used, but I'm curious of how it works. It looks kind of like a slope line. Is that it?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Alright, just look into the code and suggest why this indicator does not work, and if possible post a working solution,'