Using #resource

 
Comments that do not relate to the "New MetaTrader 5 platform build 2980: Push notifications for trade operations", have been moved into this topic.
 

Anybody having trouble with custom indicators? Now custom indicators are left out of compilation.  EA with custom indicator works fine in terminal but when migration to VPS do not work.

Any help here?

 
Eduardo Linares :

Anybody having trouble with custom indicators ? Now custom indicators are left out of compilation.  EA with custom indicator works fine in terminal but when migration to VPS do not work.

Any help here?

That's no problem at all. Also remember - here is a technical forum: if you have not submitted anything, if you have not provided any codes, if you have not provided a description of the problem, you will be ignored.

 
Vladimir Karputov:

That's no problem at all. Also remember - here is a technical forum: if you have not submitted anything, if you have not provided any codes, if you have not provided a description of the problem, you will be ignored.

***

This is the way of initializing used and it worked when compiled a few months ago, but now it works only in my terminal with no errors but not when migrated to VPS.

At the end of compilation I do not see the custom indicator included in code message like before.

Thanks

 

@Eduardo Linares 

Let use #resource 

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
 
Eduardo Linares:

***

1. Please insert the code correctly: when editing a message, press the button    Codeand paste your code into the pop-up window. (The first time I corrected your message)

2. Provide information about the operating system and about the terminal:

Forum on trading, automated trading systems and testing trading strategies

Very Glitchy MetaTrader

Vladimir Karputov, 2021.03.16 04:20

If you have a question, first of all you should show the first three lines from the 'Journal' tab


(select these lines, copy to the clipboard and paste into the message using the button  Code). It should look like this:

2021.03.16 05:13:07.133 Terminal        MetaTrader 5 x64 build 2832 started for MetaQuotes Software Corp.
2021.03.16 05:13:07.134 Terminal        Windows 10 build 19042, Intel Core i7-9750H  @ 2.60GHz, 26 / 31 Gb memory, 842 / 947 Gb disk, IE 11, UAC, GMT+2
2021.03.16 05:13:07.134 Terminal        C:\Users\barab\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075

 
Vladimir Karputov:

1. Please insert the code correctly: when editing a message, press the button    and paste your code into the pop-up window. (The first time I corrected your message)

2. Provide information about the operating system and about the terminal:


//--- create handle of the indicator OCN-NMS
   handle_OCN_NMS=iCustom(m_symbol.Name(),InpNms_TF,"ocn nms",inpNmsPeriod,inpNmsPrice,inpTemaPeriod);
//--- if the handle is not created
   if(handle_OCN_NMS==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code
      PrintFormat("Failed to create handle of the OCN-NMS indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early
      return(INIT_FAILED);
     }       
//--- create handle of the indicator iBBSC
   handle_iBBSC=iCustom(m_symbol.Name(),InpBBSC_TF,"Bollinger bands squeeze",inpPeriodC,inpPriceC,inpDeviationsC,
                        inpAtrMultiplierC,inpZonesPercentC);
//--- if the handle is not created 
   if(handle_iBBSC==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iBBSC indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }     
//---

2021.06.28 11:12:05.124 Terminal        ForexTime (FXTM) MT5 x64 build 2981 started for FXTM FT Global Ltd
2021.06.28 11:12:05.125 Terminal        Windows 10 build 19042, Intel Core i5-6200U  @ 2.30GHz, 4 / 7 Gb memory, 756 / 885 Gb disk, IE 11, UAC, GMT-5
2021.06.28 11:12:05.125 Terminal        C:\Users\Eduardo\AppData\Roaming\MetaQuotes\Terminal\158904DFD898D640E9B813D10F9EB397

Ok here I go again.  This used to work a few months ago.

Not tried using  #resource "\\Indicators\\SampleIndicator.ex5" yet.  Thanks for your patience.

 
Eduardo Linares :

Ok here I go again.  This used to work a few months ago.

Not tried using  #resource   "\\Indicators\\SampleIndicator.ex5" yet.  Thanks for your patience.

Are your indicators using Forbidden Calls (dlls)?

 
Vladimir Karputov:

Are your indicators using Forbidden Calls (dlls)?

No dlls

 
Eduardo Linares :

No dlls

Does your code use WinAPI calls?

You could greatly reduce your time if you attach all your MQL5 codes.

 
Vladimir Karputov:

Does your code use WinAPI calls?

You could greatly reduce your time if you attach all your MQL5 codes.

No WinAPI calls in code.  I have other EA coded somewhere mid 2020 with the same custom indicators and at that time compiler included custom indicators inside EA and still works fine on VPS.  Now it does not include in compilation.

We all know that metatrader update the code every other week so I am just wondering if something change in compiler. Probably a work around this is to just load both custom indicators and EA in the chart and then migrate to VPS, but I dont see the point of loading indicators in a chart into a VPS that doesnt even have a monitor screen to watch.

thanks