From 947cfead178530121711003c480740fbefbe2d6f Mon Sep 17 00:00:00 2001 From: moshferatu Date: Fri, 3 Jan 2025 08:57:12 -0800 Subject: [PATCH] Add SuperSmoother period property to SuperBot strategy --- strategies/super-bot/SuperBot.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/strategies/super-bot/SuperBot.cs b/strategies/super-bot/SuperBot.cs index 4b37a30..730b321 100644 --- a/strategies/super-bot/SuperBot.cs +++ b/strategies/super-bot/SuperBot.cs @@ -1,6 +1,7 @@ #region Using declarations using NinjaTrader.Cbi; using NinjaTrader.NinjaScript.Indicators; +using System.ComponentModel.DataAnnotations; #endregion namespace NinjaTrader.NinjaScript.Strategies @@ -17,10 +18,12 @@ namespace NinjaTrader.NinjaScript.Strategies Description = @"Strategy based on John F. Ehlers' SuperSmoother"; Calculate = Calculate.OnBarClose; EntriesPerDirection = 1; + + SuperSmootherPeriod = 10; } else if (State == State.Configure) { - superSmoother = SuperSmoother(10); + superSmoother = SuperSmoother(SuperSmootherPeriod); } } @@ -45,5 +48,9 @@ namespace NinjaTrader.NinjaScript.Strategies { get { return Name; } } + + [NinjaScriptProperty] + [Display(Name = "SuperSmoother Period", GroupName = "SuperBot", Order = 1)] + public int SuperSmootherPeriod { get; set; } } }