Download MetaTrader 5
To add comments, please log in or register
Register at MQL5.community and leave your comments!
Ali Poormomen
1692
Ali Poormomen 2013.05.28 06:33 

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
6690
Laurentiu Octavian Niculescu 2013.05.28 06:59  

Hi,

I'm sorry but your question is not clear.

What do you mean ? 

Ali Poormomen
1692
Ali Poormomen 2013.05.28 14:22  

Hi

excuse me

my question must be more transparent

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

Alain Verleyen
Moderator
30347
Alain Verleyen 2013.05.28 14:49  
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