I wrote an indicator called SRMomentum which I am trying to call from another indicator called SRMomentumSetup.
SRMomentum is working fine as expected and has the following constuctor
public SRMomentum SRMomentum(int period)
{
return SRMomentum(Input, period);
}
In SRMomentumSetup, I declare my class variables:
SRMomentum lowMomentum, highMomentum;
and instantiate the objects in State.DataLoaded:
lowMomentum = new SRMomentum(LowPeriod);
highMomentum = new SRMomentum(HighPeriod);
However I am getting the error for both these lines:
'Ninjatrader.NinjaScript.Indicators.SRMomentum' does not contain a constructor that takes 1 arguments
Any ideas what the problem could be please?
Regards,
iq
Comment