hello everyone, I'm getting the array out of range error with my ea ... Can anyone help me out? Thanks in advance
Skull00: hello everyone, I'm getting the array out of range error with my ea ... Can anyone help me out? Thanks in advance
-
Please post only in English on this forum. Use the automatic translation tool if needed. Use simple language structure when using mechanical translation. 2013.08.09
-
We have no idea where in that code you get the error.
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problem Your code. if(iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,0)>iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,1)&& iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,0)>iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,2)&& iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,0)>iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,3)) return(true); else return(false);
Don't copy and paste function calls. double Z0=iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,0); double Z1=iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,1); double Z2=iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,2); double Z3=iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,3); if(Z0>Z1&& Z0>Z2&& Z0>Z3) return(true); else return(false);
Simplify double Z0=iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,0); double Z1=iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,1); double Z2=iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,2); double Z3=iCustom(Symbol(),PERIOD_CURRENT,"ZigZag",12,5,3,0,3); return Z0>Z1&&Z0>Z2&&Z0>Z3;
- Your code will not work. you need to find the first and second ZigZag index with a non-EMPTY_VALUE, non-zero values. ZZ uses section. It will not have consecutive values.
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