Custom indicator as resource

 

I am trying to use a custom indicator to an EA as a resource, i have already tried the documentation way

I add at the beggining #resource "\\Indicators\\SqLinReg.ex4"

and  Oninit

{
//--- get custom indicator value
   double value=iCustom(_Symbol,_Period,"::Indicators\\SqLinReg.ex4",0,0);
   PrintFormat("Indicator: iCustom value=%f",value);
//--- ...
   return(INIT_SUCCEEDED);
} 

and at the editor its fine with no errors but when I trying the EA on tester the tester stops and in journal shows me invalid pointer access.i am not sure what i am doing wrong, Please if anyone can help me.I attach a EA just as an example and the indicator.

Files:
LR.mq4  203 kb
SqLinReg.mq4  3 kb
 
Christos Andronoudis: journal shows me invalid pointer access.i am not sure what i am doing wrong,
  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor

  2. The journal also shows you where, that might be a clue, as your posted code has no pointers.
  3. Post all relevant information, like exactly what is in the Journal. <Deleted by the Moderator>
 
William Roeder:

Remember that you have no obligation to reply. And if you feel like doing it, do it with good manners. Ironies are superfluous.

 
Miguel Angel Vico Alba # :

Pamiętaj, że nie masz obowiązku odpowiadać. A jeśli masz na to ochotę, rób to z dobrymi manierami. Ironia jest zbyteczna.

because of people like WIliam this comunity is collapsing xD
 
StickyLab Home #: because of people like WIliam this comunity is collapsing xD

Hundreds of posters have thanked me, over the decade. You have been put on my Do Not Help List; live in ignorance.