Download MetaTrader 5

QUESTION IN PROGRAMMING

To add comments, please log in or register
Mohammad Soubra
28677
Mohammad Soubra  

Hello,

---

MT4, EAs Programming 

Just I am wondering while using the ZigZag indicator by calling the iCustom() function as below:

void OnTick()
  {
//---
   double zz0=iCustom(NULL,0,"ZigZag",12,5,3,0,0);
  }

 

it is mostly giving this Alert/Error:

Array out of range: ZigZag.mq4

Biantoro Kunarto
16142
Biantoro Kunarto  

I am using this code, and it's work.


Files:
CheckEA.mq4 2 kb
Mohammad Soubra
28677
Mohammad Soubra  
Biantoro Kunarto:

I am using this code, and it's work.


but it is mostly coming in the back test
Biantoro Kunarto
16142
Biantoro Kunarto  
Mohammad Soubra:
but it is mostly coming in the back test

In strategy tester, this EA also work :


Sergey Golubev
Moderator
95983
Sergey Golubev  

Forum on trading, automated trading systems and testing trading strategies

Something Interesting

Sergey Golubev, 2016.01.27 12:41

Just some example about how to solve An array is out of range issue (I personally had this issue few times so it may be good to read the thread about how we can solve this our error during the coding for example).

To add comments, please log in or register