I have question?

 

in MQL5 Reference / Language Basics / Functions / Event Handling Functions

OnCalculate part

there is an example:

void OnStart()
{
//---
string terminal_path=StatusInfoString(STATUS_TERMINAL_PATH);
int handle_customMA=iCustom(Symbol(),PERIOD_CURRENT, "Custom Moving Average",13,0, MODE_EMA,PRICE_TYPICAL);
if(handle_customMA>0)
Print("handle_customMA = ",handle_customMA);
else
Print("Cannot open or not EX5 file '"+terminal_path+"\\MQL5\\Indicators\\"+"Custom Moving Average.ex5'");
}

It seems that the following is true

void OnStart()
  {
//---
   string terminal_path=TerminalInfoString(TERMINAL_PATH);
   int handle_customMA=iCustom(Symbol(),PERIOD_CURRENT, "Custom Moving Average",13,0, MODE_EMA,PRICE_TYPICAL);
   if(handle_customMA>0)
      Print("handle_customMA = ",handle_customMA);
   else
      Print("Cannot open or not EX5 file '"+terminal_path+"\\MQL5\\Indicators\\"+"Custom Moving Average.ex5'");

  }
 


 if it's not , please explain to me.


 

Hi,

I'm sorry but your question is not clear.

What do you mean ? 

 

Hi

excuse me

my question must be more transparent

Do we have StatusInfoString() function or STATUS_TERMINAL_PATH enumeration in mql5?

 
alipoormomen:

Hi

excuse me

my question must be more transparent

Do we have StatusInfoString() function or STATUS_TERMINAL_PATH enumeration in mql5?

Good catch, the right function is TerminalInfoString() with TERMINAL_PATH property_id.