Setting up variables/constants that have non-numeric values
-
Some blocks have parameters that show text values e.g. the 'bull candle' node has a 'row mode' parameter that can be set to 'normal', 'candle size increase' and 'candle size decrease'. To assign these values to a variable, do you use an integer variable and assign as 0, 1, 2 etc. following the order in the drop-down menu or do you use a string variable and assign 'normal' etc?
Thanks
-
@tonyramirez yes, usually integers do just fine.
You can also set datatype as some enum type, then you'll get the drop-down menu in mt4/mt5.
For example, timeframes datatype is ENUM_TIMEFRAMES
https://docs.mql4.com/constants/chartconstants/enum_timeframes