how to add time frame on message notice

To add comments, please log in or register
TienGrT
45
TienGrT  

Dear,

kindly help me add timeframe on message notice for this indicator.

For example: when I attach this indicator on M15 time frame on NZDUSDpro it will notice 

"NZDUSDpro M15 NZDUSDpro at 21:14:19 Red crossed line" instead of just now "NZDUSDpro  NZDUSDpro at 21:14:19  Red crossed line" 

and when I attach this indicator on H1 time frame on NZDUSDpro it will notice 

"NZDUSDpro H1  NZDUSDpro at 21:14:19 Red crossed line" instead of just now "NZDUSDpro  NZDUSDpro at 21:14:19 Red crossed line" 

Marco vd Heijden
Moderator
8383
Marco vd Heijden  

Add

_Period

Somewhere in the message.

Anthony Garot
1939
Anthony Garot  

@Marco vd Heijden 's answer plus EnumToString() to convert it into something human readable.

PrintFormat("NZDUSDpro %s NZDUSDpro at . . . ", EnumToString(_Period));
Mohamad Zulhairi Baba
16810
Mohamad Zulhairi Baba  
StringSubstr(EnumToString((ENUM_TIMEFRAMES)_Period),7)
To add comments, please log in or register