diff --git a/indicators/%b/PercentB.cs b/indicators/%b/PercentB.cs index 90b02a2..c719384 100644 --- a/indicators/%b/PercentB.cs +++ b/indicators/%b/PercentB.cs @@ -76,21 +76,17 @@ namespace NinjaTrader.NinjaScript.Indicators [Display(Name = "Standard Deviations", GroupName = "%B", Order = 2)] public double StandardDeviations { get; set; } - [NinjaScriptProperty] [Range(double.MinValue, double.MaxValue)] [Display(Name = "Upper Level", GroupName = "Plots", Order = 2)] public double UpperLevel { get; set; } - [NinjaScriptProperty] [Display(Name = "Upper Level Stroke", GroupName = "Plots", Order = 3)] public Stroke UpperLevelStroke { get; set; } - [NinjaScriptProperty] [Range(double.MinValue, double.MaxValue)] [Display(Name = "Lower Level", GroupName = "Plots", Order = 4)] public double LowerLevel { get; set; } - [NinjaScriptProperty] [Display(Name = "Lower Level Stroke", GroupName = "Plots", Order = 5)] public Stroke LowerLevelStroke { get; set; } @@ -105,18 +101,18 @@ namespace NinjaTrader.NinjaScript.Indicators public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase { private PercentB[] cachePercentB; - public PercentB PercentB(int period, double standardDeviations, double upperLevel, Stroke upperLevelStroke, double lowerLevel, Stroke lowerLevelStroke) + public PercentB PercentB(int period, double standardDeviations) { - return PercentB(Input, period, standardDeviations, upperLevel, upperLevelStroke, lowerLevel, lowerLevelStroke); + return PercentB(Input, period, standardDeviations); } - public PercentB PercentB(ISeries input, int period, double standardDeviations, double upperLevel, Stroke upperLevelStroke, double lowerLevel, Stroke lowerLevelStroke) + public PercentB PercentB(ISeries input, int period, double standardDeviations) { if (cachePercentB != null) for (int idx = 0; idx < cachePercentB.Length; idx++) - if (cachePercentB[idx] != null && cachePercentB[idx].Period == period && cachePercentB[idx].StandardDeviations == standardDeviations && cachePercentB[idx].UpperLevel == upperLevel && cachePercentB[idx].UpperLevelStroke == upperLevelStroke && cachePercentB[idx].LowerLevel == lowerLevel && cachePercentB[idx].LowerLevelStroke == lowerLevelStroke && cachePercentB[idx].EqualsInput(input)) + if (cachePercentB[idx] != null && cachePercentB[idx].Period == period && cachePercentB[idx].StandardDeviations == standardDeviations && cachePercentB[idx].EqualsInput(input)) return cachePercentB[idx]; - return CacheIndicator(new PercentB(){ Period = period, StandardDeviations = standardDeviations, UpperLevel = upperLevel, UpperLevelStroke = upperLevelStroke, LowerLevel = lowerLevel, LowerLevelStroke = lowerLevelStroke }, input, ref cachePercentB); + return CacheIndicator(new PercentB(){ Period = period, StandardDeviations = standardDeviations }, input, ref cachePercentB); } } } @@ -125,14 +121,14 @@ namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns { public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase { - public Indicators.PercentB PercentB(int period, double standardDeviations, double upperLevel, Stroke upperLevelStroke, double lowerLevel, Stroke lowerLevelStroke) + public Indicators.PercentB PercentB(int period, double standardDeviations) { - return indicator.PercentB(Input, period, standardDeviations, upperLevel, upperLevelStroke, lowerLevel, lowerLevelStroke); + return indicator.PercentB(Input, period, standardDeviations); } - public Indicators.PercentB PercentB(ISeries input , int period, double standardDeviations, double upperLevel, Stroke upperLevelStroke, double lowerLevel, Stroke lowerLevelStroke) + public Indicators.PercentB PercentB(ISeries input , int period, double standardDeviations) { - return indicator.PercentB(input, period, standardDeviations, upperLevel, upperLevelStroke, lowerLevel, lowerLevelStroke); + return indicator.PercentB(input, period, standardDeviations); } } } @@ -141,14 +137,14 @@ namespace NinjaTrader.NinjaScript.Strategies { public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase { - public Indicators.PercentB PercentB(int period, double standardDeviations, double upperLevel, Stroke upperLevelStroke, double lowerLevel, Stroke lowerLevelStroke) + public Indicators.PercentB PercentB(int period, double standardDeviations) { - return indicator.PercentB(Input, period, standardDeviations, upperLevel, upperLevelStroke, lowerLevel, lowerLevelStroke); + return indicator.PercentB(Input, period, standardDeviations); } - public Indicators.PercentB PercentB(ISeries input , int period, double standardDeviations, double upperLevel, Stroke upperLevelStroke, double lowerLevel, Stroke lowerLevelStroke) + public Indicators.PercentB PercentB(ISeries input , int period, double standardDeviations) { - return indicator.PercentB(input, period, standardDeviations, upperLevel, upperLevelStroke, lowerLevel, lowerLevelStroke); + return indicator.PercentB(input, period, standardDeviations); } } }