How can I recognise programmatically when an up/down arrow is drawn on a chart when arrow objects are hidden?

Viewed 838

I know how to draw an object arrow on the chart, which I usually do like this:

      ObjectCreate(0,"prevHigh",OBJ_ARROW_DOWN,0,Time[0],High[highestCandle]);  
      ObjectSetInteger(0, "prevHigh", OBJPROP_COLOR, clrRed);

Now I have an indicator which (I didn't code myself and is a .ex4 file which) draws up/down arrows on the chart as seen in the image (https://imgur.com/a/8yG0suw).

enter image description here

How can I when for example a Magenta down arrow has been drawn and the candle (index) at which it is drawn?

Please note that the arrows not in the list of objects on the chart enter image description here

1 Answers

Q : "How can I recognise programmatically when an up/down arrow is drawn on a chart?"

Given the facts above, your test ought evaluate the moment the CustomIndicator ( via a published / used iCustom()-call signature ) by checking it as it goes from EMPTY_VALUE to any value != EMPTY_VALUE.

Given the CustomIndicator is a closed source ( *.ex4 ) you may need to check, if it did set its own ( hidden from our sight ) value, other than a current visible EMPTY_VALUE, yet this "re-calibration" will work, after you get a few manual tests of the CustomIndicator values for bars, that do not show any arrow - like for the 2020-Apr-08 09:30 et al v/s the displayed arrows are not the MQL4-Objects on their own, they are the closed-source CustomIndicator's SetIndexStyle() / SetIndexArrow() by-products, thus not inspectable either in the Object-List, or in the *.mq4 source-code.

Yet, detectable

Related