I have two data series. series 1 is 1 minute data, series 2 is daily data. I want to use the daily 60 days move average close price to do some simple math as one input parameter of another indicator.
Here are the codes
A1 = 25;
A2 = 70;
A3 = 5;
A4 = 10;
A5 = 10;
A6 = 5;
A7 = 10;
A8 = 10;
Quantity = 1;
}
else if (State == State.Configure)
{
AddDataSeries("YMMAR25",Data.BarsPeriodType.Day, 1, Data.MarketDataType.Last);
}
else if (State == State.DataLoaded)
{
Moonlight1 = Moonlight(Close, A1, 70*(SMA[0]/42000), Convert.ToInt32(A3), Convert.ToInt32(A4), true, Convert.ToInt32(A5));
SMA1=SMA(Closes[1],60);
I got the errors as follows
NinjaScript File,Error,Code,Line,Column,
Moonligh.cs,Cannot apply indexing with [] to an expression of type 'method group',CS0021,331,72,
Is there any walk around method? Thank you.

Comment