@vonxolo
As I am aware you indicator is the one from forex-station. It only repaints for the current bar. It has buffers that clearly show the object (arrow) directions. Identifying the objects is unlikely the best way to use the indicator in EA. Work on the buffers may be a better approach.
@smille99 Sorry, I forgot you cannot select candle ID for objects directly. You can search for the closest arrow to the present candle by limiting the number of objects to 1 like this: