Using Constants for Timeframe
-
is it possible to use constants for Timeframe selection. Right now I am receiving undeclared identifier error
-
Yes it is but it depends where you mean.
-
The data type is : ENUM_TIMEFRAMES
Value 0 for current timeframe
-
https://fxdreema.com/shared/3u6RFQdic The constant in question is the TStart_TF constant. @sktsec i'm not quite sure how i would enter that data type
-
@capitalfreedom said in Using Constants for Timeframe:
TStart_TF

Enter ENUM_TIMEFRAMES at the leftmost entry. Then your constant name
-
@sktsec Awesome thanks! Is there a breakdown to know what number is for which timeframe. like 0 being the current etc?
-
@capitalfreedom
e.g. PERIOD_M5 is 5-minute period.Following link have all the details. As your input will handle it all provided you have selected the favorable timeframe, actually you won't need to worry about that.
https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes