myTypical = (Max(High, 3)+Min(Low, 3)+Close) / 3
Simple enough but I don't know how to work around the strongly typed C#.
These are the code snippets where I attempt to do this.
Variable Declaration...
private DataSeries myTypical;
protected void RedefineTypical()
{
myTypical.Set((Math.Max(High[0], 3)+Math.Min(Low[0], 3)+Close[0]) / 3);
}
Ok I know you know what's coming next. I get a compile error stating Operator '+' cannot be applied to operands of type 'NinjaTrader.Data.lDataSeries' and 'NinjaTrader.Data.lDataSeries'
Also I get an error "the best overloaded method match for system.math.mas(sbyte,sbyte) has some invalid arguments. argument '1' cannot convert from ninjatrader.dat.idataseries to sbyte.
Thank you for your help.
Mike
Comment