I have been able to find the candle index of arrow objects that appear on a chart using the code below:
if(ObjectType(name) == OBJ_ARROW){
if(ObjectGet(name, OBJPROP_COLOR) == Red){
arrowTime =(datetime)ObjectGetInteger(0,name,OBJPROP_TIME);
int shift = iBarShift(_Symbol, PERIOD_CURRENT, arrowTime);
Print("RED ARROW AT CANDLE ", shift);
}
}
I want to achieve something that is a bit different. How can I tell if an arrow object was drawn on the last but one candle when it closes?