Alert: Error copying Bollinger Bands indicator Buffers - error:4807!!

 

Hi, so i was about to test my EA and I had this error "Alert: Error copying Bollinger Bands indicator Buffers - error:4807!!" What am I doing wrong? I used the same code on my another EA and it worked.

Regards 

if(CopyBuffer(BolBandsHandle,0,0,3,BBMidle)<0)
   {
   Alert("Error copying Bollinger Bands indicator Buffers - error:",GetLastError(),"!!");
   return;
   
   } 
   
   if(CopyBuffer(BolBandsHandle,1,0,3,BBUp)<0)
   {
   Alert("Error copying Bollinger Bands indicator Buffers - error:",GetLastError(),"!!");
   return;
   
   }
   if(CopyBuffer(BolBandsHandle,2,0,3,BBLow)<0)
     {
      Alert("Error copying Bollinger Bands indicator Buffers - error:",GetLastError(),"!!");
      return;
     }

   if(CopyBuffer(maHandle,0,0,3,maVal)<0)
     {
      Alert("Error copying MA indicator buffer - error:",GetLastError());
      return;
     }
 
Didn't find anything
 

https://www.mql5.com/en/docs/constants/errorswarnings/errorcodes

ERR_INDICATOR_WRONG_HANDLE

4807

Wrong indicator handle

Documentation on MQL5: Standard Constants, Enumerations and Structures / Codes of Errors and Warnings / Runtime Errors
Documentation on MQL5: Standard Constants, Enumerations and Structures / Codes of Errors and Warnings / Runtime Errors
  • www.mql5.com
Standard Constants, Enumerations and Structures / Codes of Errors and Warnings / Runtime Errors - Reference on algorithmic/automated trading language for MetaTrader 5
 
Marco vd Heijden:

https://www.mql5.com/en/docs/constants/errorswarnings/errorcodes

ERR_INDICATOR_WRONG_HANDLE

4807

Wrong indicator handle

Still can't understad what do I got to change
 
Marco vd Heijden:

https://www.mql5.com/en/docs/constants/errorswarnings/errorcodes

ERR_INDICATOR_WRONG_HANDLE

4807

Wrong indicator handle

it does not explain what is WRONG INDICATOR HANDLE !!!

 
Anil Varma :

it does not explain what is WRONG INDICATOR HANDLE !!!

This means the following:

  • You or did not create an indicator handle
  • or you created an indicator handle and received an error (but did not handle the error)
Show the mq5 code (OnInit section) - so that we can see your code.
Reason: