// Condition set 1
if (BarsInProgress == 0)
{
// Set DataSeries object to store the trading range of the primary bar
primarySeries.Set(Stochastics(7, 12, 3).K);
}
// Executed on secondary bar updates only
if (BarsInProgress == 1)
{
// Set the DataSeries object to store the trading range of the secondary bar
secondarySeries.Set(Close[0] - Close[24]);
}
// When conditions in both primary and secondary enter long
if (CrossAbove(primarySeries[0],20,1) && secondarySeries[0] > 0)
EnterLong();
Ninja is indicating errors with the primarySeries.Set which are
The best overloaded method match for 'NinjaTrader.Data.DataSeries.Set(double)' has some invalid arguments
and
Argument '1': cannot convert from 'NinjaTrader.Data.DataSeries' to 'double'
Ninja also does not like the final condition. Indicating the following errors
The best overloaded method match for 'NinjaTrader.Strategy.StrategyBase.CrossAbove(doub le, NinjaTrader.Data.DataSeries.int)'
Argument '2': cannot convert from 'int' to NinjaTrader.Data.DataSeries'
Any help on this would be appreciated. thank you




Comment