iCustom() function allows for latter parameters to be skipped and assume default values set by the Indicator. That's why both versions in the OP's code will work correctly as he has pointed out.
The Indicator code problem has a bug in it which causes the slow-down when Alerts are disabled.
If you have the source code for the indicator, then you will have to analyse it and fix it, or create a clean version just for use by your EA.
EDIT: Alternatively, search the CodeBase for an equivalent indicator.
Paul Anscombe #: yes, but he is not skipping the later inputs, he is inserting extra inputs in the middle so they will not align with the indicator inputs.
No! He is doing it correctly. The buffer index and the shift are always the last 2 parameters.
iCustom
Calculates the specified custom indicator and returns its value.
double iCustom( string symbol, // symbol int timeframe, // timeframe string name, // path/name of the custom indicator compiled program ... // custom indicator input parameters (if necessary) int mode, // line index int shift // shift ); |
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys I have this indicator that I want to use in my EA. This indicator have a lots of alert in the setting and when I backtest the EA it will popped up on the journal tab. I want to turn off all the alerts but when I used false on the input tab it will result in a slow backtest. Is there a way to turn off the alert without affecting the backtest speed?
<ex4 file removed>