Thanks Steve for the detailed explanation, it is greatly appreciated...SteveHopwood » Tue Feb 02, 2016 7:58 pm wrote:GridType is an enumeration, ENUM in the code. These are array constants that allow coders to show users a list of relevant inputs only. They are represented in set files by their integer equivalents, so Stop_Orders_Only is represented by 0, whilst Stop_And_Limit_Orders is represented by 1.
Fledgling coders, I only came across enumerations a few weeks ago; they are really useful. There are a number of inbuilt enumeration constants accessed through the ENUM command, as in:
extern ENUM_TIMEFRAMES TradingTimeFrame=PERIOD_M15;
This would be represented by 15 in the set file.
Rene showed me how to define my own:Then FXCoder showed me how to present them as a user input:Code: Select all
enum GridStrategyType { Stop_Orders_Only, Stop_And_Limit_Orders };
input GridStrategyType GridType=Stop_Orders_Only;
Useful thingies.
It has inspired me to start learning Mql4 programming...
It would be nice not having to depend on others for files and code, and give me some independence!
If I can keep focused on the good days that is... hehe
Cheers