Build 600 Scripts Require Incoming Tick?

 

Simple label create and delete code

CREATE PRICE LABEL

extern color UpperPrice = Blue;

int deinit() {
    return( 0 );
}

int start()
  {

   double CreateLabel = ObjectCreate("UPPER", OBJ_ARROW,0,TimeCurrent(),Bid,0);
                        ObjectSet("UPPER",OBJPROP_ARROWCODE,6); 
                        ObjectSet("UPPER",OBJPROP_COLOR,UpperPrice);
                        ObjectSet("UPPER",OBJPROP_WIDTH,4);
                        WindowRedraw();
   
//----
   return(0);
  }
//+------------------------------------------------------------------+


DELETE PRICE LABEL
int deinit() {
    return( 0 );
}

int start()
  {
       
 ObjectDelete( "UPPER");
 WindowRedraw();
 
//----
   return(0);
  }
//+------------------------------------------------------------------+

1. Drop Create Price Label onto chart ---- good!

2. Drop Delete Price Label onto chart ---- good!

3. Drop Create Price Label onto chart again (before next incoming price tick) ---- Label appears in objects list, but can't be seen on chart because it's given a price value of 0.

However, if one waits for NEW price tick or refreshes chart, it works, but then repeats above cycle again.

 
Build 604, same thing. New tick needed :(
 

Try OnStart() instead of start()

btw this is a guess, I've been coding for less then a week.

 
JPS:
Build 604, same thing. New tick needed :(

so fake a tick
 

Thank you. There was a bug.

Fixed

 
Thank you stringo !!! :)
Reason: