View Single Post
  #5 (permalink)  
Old 06-07-2006, 08:25 AM
Kalenzo's Avatar
Kalenzo Kalenzo is offline
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 693
Kalenzo is on a distinguished road
Quote:
Originally Posted by deepdrunk
hi,
i was about to ask the sme question.

Can someone make a code to delete all items(objects) from the chart that are not from the last day or maybe to choose how many days back to be left?

I have 6 charts open at same time with max bars in history with bunch of objects and i think it is slowing my computer pretty much.
This should work but I didnt test it:

datetime currentDay = StrToTime(Year()+"."+Month()+"."+Day()+" 00.00");

for(int i=0;i<ObjectsTotal();i++)
{
if(ObjectType(i) == OBJ_ARROW && ObjectGet(ObjectName(i),OBJPROP_TIME1)>currentDay)
{
ObjectDelete(ObjectName(i));
}
}
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
Reply With Quote