The way I'm trying to do this is by using a setter for the horizontal line's "Stroke" property, and storing the new value in a "UserDefinedStroke" property if the new value isn't equal to the disabled alert stroke. The problem is, whenever I try to compare if the brushes are equal, NinjaTrader crashes and corrupts my workspace, and I need to recreate it.
Here's the code I'm using to do the check, the equality check is the same as the one mentioned as working in this topic: https://ninjatrader.com/support/foru...ad.php?t=90510
[Display(ResourceType=typeof(Custom.Resource), GroupName = "NinjaScriptGeneral", Name = "NinjaScriptDrawingToolLine", Order = 1)] public Stroke Stroke { get { return stroke; } set { if(Equals(value.Brush.ToString(), DisabledStroke.Brush.ToString())) { ChosenStroke = value; } stroke = value; }}
If there's a better way to find out if the stroke change was caused by the user, like an event caused by the user applying changes, would also be really helpful to know.
Comment