i am developing an indicator that print horizontal lines, one of the input properties is a Stroke to define color and width for the horizontal line, something like
[NinjaScriptProperty]
[XmlIgnore]
[Display(Name="style", Description="xxx", Order=10, GroupName="Parameters")]
public Stroke LineStyle
{ get; set; }
And in State == State.SetDefaults i set a default value like
LineStyle = new Stroke(Brushes.White, DashStyleHelper.Solid, 1);
I draw the Horizontal line with this code:
HorizontalLine openSecondHorizontalLine = Draw.HorizontalLine(this, "hl_openSecondVolume", openHorizontalLine.StartAnchor.Price, true, "");
openSecondHorizontalLine.Stroke = LineStyle;
So it works for add the indicator to a chart, but if i change on the indicator parameter input (when its added to a chart) and set the width of the Stroke to 2 or other number and save as default template, t works while NT8 is working, but when i close NT8 application and open again, it sets again the 1 value of the width and does not load the default saved template. same happens with the color of the line.
Comment