I calling an indicator in my EA using iCustom, and the indicator has an input parameter. How can back-test the EA using different input values of the indicator's input parameter...
Of course I can set a default value and compile the indicator with different default input values. But, I don't want recompile it every time.
Please let me know what is the right way to do this.
Thank you,
int iCustom( string symbol, // symbol name ENUM_TIMEFRAMES period, // period string name // folder/custom_indicator_name ... // list of indicator input parameters );https://www.mql5.com/en/docs/indicators/icustom

- www.mql5.com
@hermestrading Here's an example of how a call to iCustom might be structured:
int myHandle = iCustom(_Symbol, _Period, "::Indicators\\<path\\to\\custom\\indicator>", [param_1, param_2,...param_n]);
- replace "<path\\to\\custom\\indicator>" with the correct path to your indicator.
- fill in the needed parameters at the end, after the path name. Separate multiple parameters with ', ' (comma).
Of course, this need to be in the appropriate event handler method, typically in OnInit().
Keep in mind this point from the iCustom docs (see @Philipp Negreshniy's link above:
[in] input-parameters of a custom indicator, separated by commas. Type and order of parameters must match. If there is no parameters specified, then default values will be used.

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I calling an indicator in my EA using iCustom, and the indicator has an input parameter. How can back-test the EA using different input values of the indicator's input parameter...
Of course I can set a default value and compile the indicator with different default input values. But, I don't want recompile it every time.
Please let me know what is the right way to do this.
Thank you,