AllowRemovalOfDrawObjects

View as Markdown

Definition

Determines if programmatically drawn DrawObjects are allowed to remove manually from the chart

Property Value

When set to true, the draw objects from the indicator or strategy can be deleted from the chart manually by a user. If false, draw objects from the indicator or strategy can only be removed from the chart if the script removes the drawing object, or the script is terminates. Default set to false.

Syntax

AllowRemovalOfDrawObjects

Examples

1protected override void OnStateChange()
2{
3 Add(new Plot(Brushes.Orange, "SMA"));
4 AllowRemovalOfDrawObjects = true; // Draw objects can be removed separately from the script
5}