What is wrong here: Err 4002: ERR_WRONG_INTERNAL_PARAMETER: Wrong parameter in the inner call of the client terminal function" ??

To add comments, please log in or register
Carl Schreiber
Moderator
7244
Carl Schreiber  

My (win10,64, Mt5 b 1881)  call:

..
input int      BB_Period = 14;
input double   BB_Devi   = 2;
..
int Hdl_BB;
int OnInit() {
   ..
   Hdl_BB = iBands(_Symbol,PERIOD_CURRENT,BB_Period,0,BB_Devi,PRICE_CLOSE);
   if(Hdl_BB==INVALID_HANDLE) {
      Print(__LINE__," The iBands(",(string)Hdl_BB,") by ",EnumToString(PRICE_CLOSE)," object was not created: Error ",GetLastError());
      return INIT_FAILED;
   }
   ..
}
=> ... (EURUSD,M5)	51 The iBands(-1) by PRICE_CLOSE object was not created: Error 4002

What can I do 'against' the "inner call of the client terminal function"?

Deep massages?

Thanks in advance!

Petr Nosek
1526
Petr Nosek  
Carl Schreiber:

My (win10,64, Mt5 b 1881)  call:

What can I do 'against' the "inner call of the client terminal function"?

Deep massages?

Thanks in advance!

Maybe I didn't understand you well but you should check the parameters (BB_Period and BB_Devi) befor using iBands(). Both can't be zero.

Carl Schreiber
Moderator
7244
Carl Schreiber  

OK - that was it - I used the editors template and I assumed that I have defined 14 and 2 - instead of 0, 0 :(

Anyway thanks!

To add comments, please log in or register