The issue is that with derived classes the public browsable properties are not scripted in the constructor in the auto generated script region . so its constructor signature does not match what is really there.
Please see attached indie:
The end result misses the base.Period property.... which is available via reflection propertyinfo on "this".... you would simply script properties by attribute.
#region NinjaScript generated code. Neither change nor remove.
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
publicpartialclass Indicator : IndicatorBase
{
private ModSMA[] cacheModSMA = null;
privatestatic ModSMA checkModSMA = new ModSMA();
///<summary>
/// Derived from the SMA class
///</summary>
///<returns></returns>
public ModSMA ModSMA(int threshold)
{
return ModSMA(Input, threshold);
}
.........
///Desired Generated code
public ModSMA ModSMA(int threshold, int period)
{
return ModSMA(Input, threshold, period);
}
The obvious way round this is to code the public properties in again - overlaod them and use the base class properties inside - but the compiler syntax checker thinks this is a self referencing issue -recursive property
http://www.screencast.com/users/MicroTrends/folders/Jing/media/408e7184-41ce-4380-b7af-6112d03c9581
Please can we chane the editor so this use of inheritance works - it will save me potentially weeks of coding over the project lifecycle.
Comment