How would I go about counting the amount of Vertical Lines one hour both sides of current time, without specifying the exact names of the objects?
thanks,
Mark.
How would I go about counting the amount of Vertical Lines one hour both sides of current time, without specifying the exact names of the objects?
thanks,
Mark.
wow! I didn't anticipate a remedy that is complete, thank you! That generous with your time!
M
If it was not clear what this was for, I wanted to use the news calendar indior from here to put lines on the chart, then use this at an EA to filter trades about news, so I imagine that a few people will find this helpful
Mark-Originally Posted by ;
That is a way of doing this. Contemplating no object can be created with no exceptional name its then a matter of getting the objects time worth and the ascertain where it is regarding the current hour.
Inserted Code int CurrentHour=10; for(int I=0; ilt;24; I ) int before=0; int after=0; for(int cnt=1;cntlt;ObjectsTotal();cnt ) string name = ObjectName(cnt); int ThisHr = TimeHour(ObjectGet(name, OBJPROP_TIME1)); if(ThisHr lt; CurrentHour) earlier ; else if(ThisHr gt; CurrentHour) after ; Print(Current Hour: CurrentHour ObjectsTotal() objects complete - earlier before after later );