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

浪子不回头ぞ 提交于 2020-05-28 04:25:51

问题


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).

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


回答1:


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



来源:https://stackoverflow.com/questions/61132974/how-can-i-recognise-programmatically-when-an-up-down-arrow-is-drawn-on-a-chart-w

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!