Even after dealing with such an error in the past, I can't figure out what is causing the error now. Every properties seems to be defaulted and only the brushes are serialized,
I get the error:
#region #### OnStateChange #### protected override void OnStateChange() { base.OnStateChange(); switch (State) { #region State.SetDefault case State.SetDefaults: Description = @"BWMarketStructure"; Name = "BWMarketStructure"; Calculate = Calculate.OnBarClose; // NT8 Standard MaximumBarsLookBack = MaximumBarsLookBack.Infinite; DrawOnPricePanel = true; IsOverlay = true; DisplayInDataBox = true; IsSuspendedWhileInactive = true; PaintPriceMarkers = false; // PropertiesDefaults PropertiesDefaults(); break; #endregion #region #### Properties #### private void PropertiesDefaults() { #region #< Structure Setup ># MaxLookbackObjects = 128; HTFTypeAsSTF = true; HTFBarType = BarsPeriodType.Minute; HTFValue = 15; HTFValue2 = 11; HTFBaseBarsPeriodValue = 30; BiasLength = 3; #endregion #region #< Swing Setup Params ># SwingStrength = 4; UseHighLowSwings = true; #endregion #region #< Swing Visual ># ShowSwingLegs = true; ShowSwingLabels = true; SwingsUpStroke = new Stroke(Brushes.RoyalBlue,DashStyleHelper.Solid,2); SwingsDownStroke = new Stroke(Brushes.Red,DashStyleHelper.Solid,2); #endregion #region #< Signals Visual ># SignalLongBrush = Brushes.Green; SignalShortBrush = Brushes.Red; #if DEBUG ShowSignalLabel = true; #endif ShowPriceSignalMark = true; PriceSignalBrush = Brushes.Yellow; ShowSetup = true; SetupLongBrush = Brushes.Aqua; SetupShortBrush = Brushes.Gold; SetupNaturalBrush = Brushes.White; #endregion } #region ##<< Input Params >>## #region #< Structure Setup ># [NinjaScriptProperty, Range(10, int.MaxValue)] [Display(Name = "Max Lookback Objects", Description = "Max Lookback objects. The system will automaticly remove all unused historical swings over this number", GroupName = "Structure Setup", Order = 2)] public int MaxLookbackObjects { get; set; } [NinjaScriptProperty] [RefreshProperties(RefreshProperties.All)] // Needed to refresh the property grid when the value changes [Display(Name = "HTF BarType like STF", Description = "Higher Timeframe BarType similar to STF", GroupName = "Structure Setup", Order = 6)] public bool HTFTypeAsSTF { get; set; } [NinjaScriptProperty] [Display(Name = "HTF BarType", Description = "Higher Timeframe BarType", GroupName = "Structure Setup", Order = 8)] public BarsPeriodType HTFBarType { get; set; } [NinjaScriptProperty, Range(1, int.MaxValue)] [Display(Name = "HTF Period Value", Description = "Higher Timeframe Period Value", GroupName = "Structure Setup", Order = 10)] public int HTFValue { get; set; } [NinjaScriptProperty, Range(1, int.MaxValue)] [Display(Name = "HTF Value2(Offset)", Description = "Higher Timeframe Period Value2 (Offset...)", GroupName = "Structure Setup", Order = 12)] public int HTFValue2 { get; set; } [NinjaScriptProperty, Range(1, int.MaxValue)] [Display(Name = "HTF BBPValue(Reversal)", Description = "Higher Timeframe Base Bars Period Value (Reversal...)", GroupName = "Structure Setup", Order = 14)] public int HTFBaseBarsPeriodValue { get; set; } [NinjaScriptProperty, Range(2, 50)] [Display(Name = "Bias Length", Description = "Bias Length", GroupName = "Structure Setup", Order = 22)] public int BiasLength { get; set; } #endregion #region #< Swing Setup Params ># [NinjaScriptProperty, Range(1, int.MaxValue)] [Display(Name = "Swing Strength", Description = "Strength of the Swings. Highier values will reduce noise", GroupName = "Swing Setup", Order = 4)] public int SwingStrength { get; set; } [NinjaScriptProperty] [Display(Name = "Use High/Low Swings", Description = "Base the Swings on the High/Low values. Otherwise the Open and Close are used", GroupName = "Swing Setup", Order = 6)] public bool UseHighLowSwings { get; set; } #endregion #region #< Swing Visual ># [RefreshProperties(RefreshProperties.All)] // Needed to refresh the property grid when the value changes [Display(Name = "Show Swing Legs", Description = "Display the Swing Structure", GroupName = "Swing Visual", Order = 2)] public bool ShowSwingLegs { get; set; } [RefreshProperties(RefreshProperties.All)] // Needed to refresh the property grid when the value changes [Display(Name = "Show Swing Labels", Description = "Display the Swing Labels", GroupName = "Swing Visual", Order = 4)] public bool ShowSwingLabels { get; set; } [Display(Name = "Swings Up Line", Description = "The Swings Leg UP stroke (color,shape,color)", GroupName = "Swing Visual", Order = 6)] public Stroke SwingsUpStroke { get; set; } [Display(Name = "Swings Down Line", Description = "The Swings Leg DONE stroke (color,shape,color)", GroupName = "Swing Visual", Order = 8)] public Stroke SwingsDownStroke { get; set; } #endregion #region #< Signals Visual ># [XmlIgnore()] [Display(Name = "Long Signal Color", Description = "Long Signal and Zones Color", GroupName = "Signals Visual", Order = 2)] public Brush SignalLongBrush { get; set; } [XmlIgnore()] [Display(Name = "Short Signal Color", Description = "Short Signal and Zones Color", GroupName = "Signals Visual", Order = 4)] public Brush SignalShortBrush { get; set; } #if DEBUG [RefreshProperties(RefreshProperties.All)] // Needed to refresh the property grid when the value changes [Display(Name = "Show Signal Label", Description = "Show Signal Label", GroupName = "Signals Visual", Order = 20)] public bool ShowSignalLabel { get; set; } #endif [RefreshProperties(RefreshProperties.All)] // Needed to refresh the property grid when the value changes [Display(Name = "Show Signal Entry Price Mark", Description = "Show Signal Entry Price Mark", GroupName = "Signals Visual", Order = 22)] public bool ShowPriceSignalMark { get; set; } [XmlIgnore()] [Display(Name = "Price Mark Color", Description = "Price Mark Color", GroupName = "Signals Visual", Order = 26)] public Brush PriceSignalBrush { get; set; } [RefreshProperties(RefreshProperties.All)] // Needed to refresh the property grid when the value changes [Display(Name = "Show Setup Markers", Description = "Show Setup Markers", GroupName = "Signals Visual", Order = 40)] public bool ShowSetup { get; set; } [XmlIgnore()] [Display(Name = "Setup Long Color", Description = "Setup Long Color", GroupName = "Signals Visual", Order = 42)] public Brush SetupLongBrush { get; set; } [XmlIgnore()] [Display(Name = "Setup Short Color", Description = "Setup Short Color", GroupName = "Signals Visual", Order = 44)] public Brush SetupShortBrush { get; set; } [XmlIgnore()] [Display(Name = "Setup Nutural Color", Description = "Setup Nutural Color", GroupName = "Signals Visual", Order = 46)] public Brush SetupNaturalBrush { get; set; } #endregion #region #< Serialize ># // Serialize our Color object [Browsable(false)] public string SignalLongBrushSerialize { get { return Serialize.BrushToString(SignalLongBrush); } set { SignalLongBrush = Serialize.StringToBrush(value); } } [Browsable(false)] public string SignalShortBrushSerialize { get { return Serialize.BrushToString(SignalShortBrush); } set { SignalShortBrush = Serialize.StringToBrush(value); } } [Browsable(false)] public string PriceSignalMarkBrushSerialize { get { return Serialize.BrushToString(PriceSignalBrush); } set { PriceSignalBrush = Serialize.StringToBrush(value); } } [Browsable(false)] public string SetupLongBrushSerialize { get { return Serialize.BrushToString(SetupLongBrush); } set { SetupLongBrush = Serialize.StringToBrush(value); } } [Browsable(false)] public string SetupShortBrushSerialize { get { return Serialize.BrushToString(SetupShortBrush); } set { SetupShortBrush = Serialize.StringToBrush(value); } } [Browsable(false)] public string SetupNaturalBrushSerialize { get { return Serialize.BrushToString(SetupNaturalBrush); } set { SetupNaturalBrush = Serialize.StringToBrush(value); } } #endregion #endregion #region ##<< Output Params >>## #if DEBUG [Browsable(false)][XmlIgnore()] public Series<double> CurBar0 { get { return Values[plotCurBar0]; } } [Browsable(false)][XmlIgnore()] public Series<double> CurBar1 { get { return Values[plotCurBar1]; } } #endif [Browsable(false)][XmlIgnore()] public Series<double> SwingPoints0 { get { return Values[plotSwings0]; } } [Browsable(false)][XmlIgnore()] public Series<double> SwingLen0 { get { return Values[plotSwingLen0]; } } [Browsable(false)][XmlIgnore()] public Series<double> Bias0 { get { return Values[plotBias0]; } } [Browsable(false)][XmlIgnore()] public Series<double> SwingPoints1 { get { return Values[plotSwings1]; } } [Browsable(false)][XmlIgnore()] public Series<double> SwingLen1 { get { return Values[plotSwingLen1]; } } [Browsable(false)][XmlIgnore()] public Series<double> Bias1 { get { return Values[plotBias1]; } } #endregion #endregion //...**** #region #### enums #### public enum SwingPointType {LL,LH,HH,HL,NA, } public enum MomentumType {None,AroonOscillator,CCI,ROC,RSI,Stochastics,MACD ,MFI,} public enum MovingAverageType {None,DEMA,EMA,HMA,SMA,TMA,VOLMA,WMA,} public enum BarCheckType {OnHold, Continue, NewSwing, Recalc} public enum Relation {Greater,GreaterEq,Eq,Lesser,LesserEq,NotEq,CrossA bove,CrossBelow,ValueIs,InRange, } #endregion
Comment