clearShape()

ICE Data Services -

clearShape()
Previous  Top  Next

clearShape()

Remove all shape objects currently drawn on the chart by drawShapeRelative() or drawShapeAbsolute().

Parameters

none
function takes no parameters

 

Usage

function main() {    
   ... 
   ...


   if ( getBarState() == BARSTATE_NEWBAR ) {
      
//clear all shape objects that may have been drawn during the 
      
//creation of the last bar
      clearShape();

      
//now we can start drawing new objects based on the current bar

   }
}