0
votes

In MetaTrader 4 the styles (e.g. arrows or lines) that are used in an indicator are not chart objects. ObjectsTotal() returns 0. Of course I can read this out via iCustom(). But what, if the EA should react to all indicators with such symbols. So without knowing the number of buffers and/or the settings of the indicator. Is there a way to automatically search for such indicator styles in the chart and use them? Or to automatically recognize the styles used and the associated buffers in an indicator?

2

2 Answers

0
votes

Q : "Is there a way to automatically search for such indicator styles in the chart and use them?"

No, there is not.

As of 2020-10, having spent 13+ years with MetaTrader4 trading automation projects, there is no support for such an automated feature re-discovery.

The code-units of Custom Indicator type hard-code the composition of Indicator Buffers (having external access-method via an iCustom() procedural interface) and GUI-style properties, not accessible at all by the user-level MQL4-{ Script | EA | Custom Indicator }-code.

If this were changed in the future releases of MetaTrader4/5 terminal, you would find details inside the documentation.

0
votes

maybe not exactly what u want but a oppurtunity

double  ObjectGet(

string object_name, // object name int index // object property );