object on chart query

 

Hi,


I have a separate window indicator that plots an object on based on high low price, but on the next bar the object disappears. I would like the object to remain on screen i.e marking the low unitl the corresponding high appears. basically the down arrow stays down until the up arrow appears, and does not disapear on the next bar. I am not a programmer, but I looked at the code and found these:


//+------------------------------------------------------------------+

int deinit()

{
clearObjects();
return(0);

}

//+------------------------------------------------------------------+


//+------------------------------------------------------------------+

void clearObjects()
{
for (int i = ObjectsTotal(); i>=0; i--)
{
string name = ObjectName(i);
if (StringSubstr(name,0,shortLength) == shortName) ObjectDelete(name) ;
}

}

//+------------------------------------------------------------------+

and deleted them but the object still dissapear on the next bar


Thanks

 
you have to give each object an unique name, otherwise you modify an existing object if the name already exists
Reason: