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/
........................................