ObjectCreate

 

hello,

I haven't see anything in the manual for the followlng (simple)issue yet.

Got an custom indicator and want the indicator to create a vertical line when "condition up" and "condition down" according to my trading criteria.

Now the function ObjectCreate("Condition up",OBJ_VLINE,0,Time[0],0); or ObjectCreate("Condition down",OBJ_VLINE,0,Time[0],0); apparently

creates just 2 objects, even if there are many trend changes according to the criteria,

So, what is a code to create an - indefinite - number of these objects(OBJ_VLINE) while the MT4 station is running?

Thanks in advance

 
if (upCondition){ static int objUpCnt;
   objUpCnt++;
   ObjectCreate("Condition up_"+objUpCnt,OBJ_VLINE,0,Time[0],0);
}
Reason: