Add SuperSmoother period property to SuperBot strategy
This commit is contained in:
parent
f3d422af79
commit
947cfead17
@ -1,6 +1,7 @@
|
|||||||
#region Using declarations
|
#region Using declarations
|
||||||
using NinjaTrader.Cbi;
|
using NinjaTrader.Cbi;
|
||||||
using NinjaTrader.NinjaScript.Indicators;
|
using NinjaTrader.NinjaScript.Indicators;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace NinjaTrader.NinjaScript.Strategies
|
namespace NinjaTrader.NinjaScript.Strategies
|
||||||
@ -17,10 +18,12 @@ namespace NinjaTrader.NinjaScript.Strategies
|
|||||||
Description = @"Strategy based on John F. Ehlers' SuperSmoother";
|
Description = @"Strategy based on John F. Ehlers' SuperSmoother";
|
||||||
Calculate = Calculate.OnBarClose;
|
Calculate = Calculate.OnBarClose;
|
||||||
EntriesPerDirection = 1;
|
EntriesPerDirection = 1;
|
||||||
|
|
||||||
|
SuperSmootherPeriod = 10;
|
||||||
}
|
}
|
||||||
else if (State == State.Configure)
|
else if (State == State.Configure)
|
||||||
{
|
{
|
||||||
superSmoother = SuperSmoother(10);
|
superSmoother = SuperSmoother(SuperSmootherPeriod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,5 +48,9 @@ namespace NinjaTrader.NinjaScript.Strategies
|
|||||||
{
|
{
|
||||||
get { return Name; }
|
get { return Name; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[NinjaScriptProperty]
|
||||||
|
[Display(Name = "SuperSmoother Period", GroupName = "SuperBot", Order = 1)]
|
||||||
|
public int SuperSmootherPeriod { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user