//+------------------------------------------------------------------+ //| test_ENUM_TIMEFRAMES.mq4 | //| Copyright 2015, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2015, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict #property script_show_inputs //--- #define TEST_PRINT_ONE(x) Print(__LINE__,", ",__FUNCTION__,", ",(#x)," = ",(x)) //--- input ENUM_TIMEFRAMES time_frames=PERIOD_CURRENT; //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { TEST_PRINT_ONE(EnumToString(time_frames)); } //+------------------------------------------------------------------+