Enumerate TimeFrames

 
Enumerate TimeFrames



enum TFrame(Period_M1, PeriodM5....); and so on.........

input  TFrame TakeTrade =Period_ M1;

The above code is meant to list TimeFrames for user to select in Expert Advisor. Please , i am not sure what is being omit.

You correction will be appreciated. Thank you.

            
 
sinput ENUM_TIMEFRAMES timeframe=PERIOD_CURRENT;// Timeframe
 
Marco vd Heijden:

 Your solution works. Thank you.

 
MThomp:

 Your solution works. Thank you.


For future reference you can do this with your own custom enums by adding a line comment after the option and it will show up in the drop-down with the comment instead of the literal enum name.

enum MyTimeFrames
{
   TF_M1, //1 minute
   TF_M5  //5 minute
};

input MyTimeFrames tf = TF_M1 //Working time-frame
 
Problem obtaining MT5 editor for Windows 8/10. Thank you