NinjaScript > Language Reference > Drawing >

AllowRemovalOfDrawObjects

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
If true, draw objects from the indicator or strategy can be removed from the chart manually. If false, draw objects from the indicator or strategy can only be removed from the chart if the script is removed as well.

 

Property Value

This property returns true if the draw objects can be removed from the chart independent of the indicator or strategy; otherwise, false. Default set to false.

 

Syntax

AllowRemovalOfDrawObjects

 

 

Examples

// Initialize method of a custom indicator
protected override void Initialize()
{
    Add(new Plot(Color.Orange, "SMA"));
    AllowRemovalOfDrawObjects = true; // Draw objects can be removed separately from the script
}