Closed cgava closed 7 months ago
Why do we include the "Custom Moving Average.mq5" which is a Metaquote include, and should have no relation with EA31337?
Indicator got ENUM_IDATA_SOURCE_TYPE InpSourceType
input param which controls calculation method. So we can pick internal calculation of MA within EA31337 codebase.
Different values of calculations are defined in the following enum (IndicatorData.enum.h
):
enum ENUM_IDATA_SOURCE_TYPE {
IDATA_BUILTIN = 0, // Platform built-in
IDATA_CHART, // Chart calculation
IDATA_ICUSTOM, // iCustom: Custom indicator file
IDATA_ICUSTOM_LEGACY, // iCustom: Custom, legacy, provided by MT indicator file
IDATA_INDICATOR, // OnIndicator: Another indicator as a source of data
IDATA_ONCALCULATE, // OnCalculate: Custom calculation function
IDATA_MATH // Math-based indicator
};
So if you pick IDATA_BUILTIN (Platform built-in), it's using iMA() platform builtin, and for IDATA_ICUSTOM_LEGACY it's going to use values from platform's indicator example file.
The aim of different methods is to compare the data for consistency and find problems when dealing with different type of calculations of indicators (GH-20 is a good example of it). And you can't compare how platform is calculating their own data without including their indicators from the Example folder. I hope that make sense.
When trying to compile the MA.mt5.mq4 Indicator, the following lines cause a compilation (can't open Custom Moving Average.mq5) input file.
Can be solved by :
Question: Why do we include the "Custom Moving Average.mq5" which is a Metaquote include, and should have no relation with EA31337?
Configuration statement
The cloning of EA31337 repo in MQL4 folder is: