2

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://i.stack.imgur.com/xYVE4.jpg).

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

Hilarious404
  • 434
  • 3
  • 13
BBNN
  • 139
  • 1
  • 9
  • **Can you prove, that the arrow objects drawn are *--not--* in the list of objects** ( by posting a printscreen thereof ? ) – user3666197 Apr 10 '20 at 07:49
  • @user3666197 Here is a screenshot of the list of all objects (https://imgur.com/a/4lRea6Y) – BBNN Apr 10 '20 at 15:08
  • @BBNN I am very interested in your question so I started a bounty for it. – Hilarious404 May 19 '20 at 05:17
  • @Hilarious404 Wow, thanks. I haven't been able to arrive at a solution yet. Hopefully this will help – BBNN May 19 '20 at 05:18
  • The claimed problem keeps not to be REPRODUCIBLE - would you mind, BBNN, to meet the StackOverflow Rules and post the MQL4 Custom Indicator, that you refer to have used for "producing" the PrintScreen-ed pictures? Not doing so will cause the @Hilarious404 sponsored bounty to just expire in vain. – user3666197 May 20 '20 at 08:36
  • @Hilarious404 I was able to get it done yesterday, I'll provide an answer soon – BBNN May 28 '20 at 04:09
  • @BBNN Hi, I would like to know if you reached to solution on how to check if the arrow exists and how to get its value/color for example? I'm facing same issue for custom indicator for which i don't have the original code...can you share the details? – A.Midany Apr 25 '21 at 14:59

1 Answers1

0

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

user3666197
  • 1
  • 6
  • 50
  • 92
  • 1
    I am not sure if I'm testing for `EMPTY_VALUE` in the right way. Please see my test code https://pastebin.com/ub8FAMzH. It is never satisfied. I kept adding parameters to iCustom till I got the error `Super Signal CHFJPY,M15: array out of range in 'Super Signal.mq4' (398,14) ` in the experts tab. I'll really appreciate some more detail into how I should go about the checking for `EMPTY_VALUE`. – BBNN Apr 10 '20 at 20:40
  • 2
    With all due respect, StackOverflow **strongly discourages from creeping** the original problem definition. Feel free to open any other question(s) as you feel you need MCVE-based problem solution advice and start to accept the best answers previously sponsored by actively contributing Community members and delivered to you, that's fair - isn't it? Adding *this* and *that* and *also what about something else* is simply **not** the way StackOverflow works. Be fair and best comply with the Community Netiquette ( which all users claimed to do comply with, during the signup, didn't we? ) – user3666197 Apr 10 '20 at 20:40