how to add time frame on message notice

 

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" 

 

Add

_Period

Somewhere in the message.

 

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

PrintFormat("NZDUSDpro %s NZDUSDpro at . . . ", EnumToString(_Period));
 
StringSubstr(EnumToString((ENUM_TIMEFRAMES)_Period),7)
Reason: