Identifying graphical objects on chart

 

Hi i have an indicator that gives arrows for buying and selling that I'm trying to turn into an EA, i do not have the source code for the indicator so I'm trying to write code that will identify these arrows on the chart but I'm not sure where to start. I know there's plenty of articles on using objects on here but I need help finding one related to my use case , any help will be greatly appreciated thank you

 
Mihlali Dlulane:

Hi i have an indicator that gives arrows for buying and selling that I'm trying to turn into an EA, i do not have the source code for the indicator so I'm trying to write code that will identify these arrows on the chart but I'm not sure where to start. I know there's plenty of articles on using objects on here but I need help finding one related to my use case , any help will be greatly appreciated thank you

iCustom


CopyBuffer


You don't need the source code of indicator since you can auto trading only by EAs.

 
_MAHA_ #:

iCustom


CopyBuffer


You don't need the source code of indicator since you can auto trading only by EAs.

The indicator doesnt give me any values i can work with ,it just shows up as "beginner(9)" and the only value it has is the price at where the arrow appears.
 
Mihlali Dlulane #:
The indicator doesnt give me any values i can work with ,it just shows up as "beginner(9)" and the only value it has is the price at where the arrow appears.

Not all of buffers are displayed in Data window, but you can get their values.

If arrows are created by objectcreate function, so you will check for any change in objs by OnChartEvent  or by change in ObjectsTotal.

 
_MAHA_ #:

Not all of buffers are displayed in Data window, but you can get their values.

If arrows are created by objectcreate function, so you should check for any change in objs by OnChartEvent  or by change in ObjectsTotal.

Im not sure on how to use OnChartEvent to check for any objects but using objects total gives me 65 objects when searching for all types
 

Im really struggling to indentify what objects this indicator creates

 
It doesn't create any "objects", it draws an arrow on each bar where the value is not equal zero or EMPTY_VALUE and it doesn't need more than a bar number and a price value to draw it exactly there. CopyBuffer is the way to extract values from said buffer.
 
Tobias Johannes Zimmer #:
It doesn't create any "objects", it draws an arrow on each bar where the value is not equal zero or EMPTY_VALUE and it doesn't need more than a bar number and a price value to draw it exactly there. CopyBuffer is the way to extract values from said buffer.

Omg! Thank you. This solved my issue the values I wanted where being kept in the 2 and third places of the array not the first. The first value is always equal to zero

While the other values are not kept as zero but a weird combination of an integer and changes to the value of a price when the arrow appears 

 
Mihlali Dlulane #:

Omg! Thank you. This solved my issue the values I wanted where being kept in the 2 and third places of the array not the first. The first value is always equal to zero

While the other values are not kept as zero but a weird combination of an integer and changes to the value of a price when the arrow appears 

Yes the most recent bar has to fulfill the conditions to show an arrow there. But it can still theoretically change on every new tick that comes from the server. So it has to be calculated anew each time. 

It won't change when it is the first previous bar (but that depends on the calculation theoretically).
I am not sure what you wrote about a weird combination of an integer though.