Using #resource - page 3

 
Eduardo Linares:

Ok, can you send me or point me to an example of code using #resource I get confused about \\ and :: etc

Thanks

Documentation: 

Working with custom indicators included as resources

Forum on trading, automated trading systems and testing trading strategies

How can I know that my expert is running on my MT VPS?

Andres Felipe, 2021.07.14 19:56

Thaks for your help. 


The expert was not loading because it requires the indicator. 


The problem was solved. I had to add it to the chart, not only to the indicator folder-.


Documentation on MQL5: MQL5 programs / Resources
Documentation on MQL5: MQL5 programs / Resources
  • www.mql5.com
Resources - MQL5 programs - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Using #resource and now getting error in my own terminal.
 
Eduardo Linares :
Using #resource and now getting error in my own terminal.

Check out the help. Write the code. Show the code.

 
Using #resource
Files:
WPR_EA_2.mq5  111 kb
 
Eduardo Linares :
Using #resource

You almost did it. You need to put in a little effort and study the example carefully:

//+------------------------------------------------------------------+
//|                                                     SampleEA.mq5 |
//|                        Copyright 2013, MetaQuotes Software Corp. |
//|                                              https://www.mql5.com |
//+------------------------------------------------------------------+
#resource "\\Indicators\\SampleIndicator.ex5"
int handle_ind;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   handle_ind=iCustom(_Symbol,_Period,"::Indicators\\SampleIndicator.ex5");
   if(handle_ind==INVALID_HANDLE)
     {
      Print("Expert: iCustom call: Error code=",GetLastError());
      return(INIT_FAILED);
     }
//--- ...
   return(INIT_SUCCEEDED);
  }
 

Finally all good now in terminal and in VPS.

Now I can continue working on this EA, still some other ideas to be tested.

A lot learned today, thanks for your patience and help.

 

Forum on trading, automated trading systems and testing trading strategies

How can I know that my expert is running on my MT VPS?

Andres Felipe, 2021.07.14 19:56

Thaks for your help. 


The expert was not loading because it requires the indicator. 


The problem was solved. I had to add it to the chart, not only to the indicator folder-.


Reason: