No matter what value I change "Threshold" to in properties the line value doesn't change, it remains at the value in "default settings".
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Calculate = Calculate.OnBarClose;
IsOverlay = false;
DisplayInDataBox = true;
DrawOnPricePanel = true;
DrawHorizontalGridLines = true;
DrawVerticalGridLines = true;
PaintPriceMarkers = true;
ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
//Disable this property if your indicator requires custom values that cumulate with each new market data event.
//See Help Guide for additional information.
IsSuspendedWhileInactive = true;
Threshold = 100;
#endregion
AddLine(Brushes.DarkGray, Threshold, "Threshold");
AddLine(Brushes.DarkGray, -Threshold, "Threshold");
}
}
#region Properties
[Range(0, int.MaxValue), NinjaScriptProperty]
[Display(ResourceType = typeof(Custom.Resource), Name = "Threshold", GroupName = "NinjaScriptParameters", Order = 1)]
public int Threshold
{ get; set; }
#endregion
Comment