Download MetaTrader 5

I have question?

To add comments, please log in or register
Ali Poormomen
3410
Ali Poormomen  

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.


Laurentiu Octavian Niculescu
6730
Laurentiu Octavian Niculescu  

Hi,

I'm sorry but your question is not clear.

What do you mean ? 

Ali Poormomen
3410
Ali Poormomen  

Hi

excuse me

my question must be more transparent

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

Alain Verleyen
Moderator
29859
Alain Verleyen  
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.
To add comments, please log in or register