I am developing an indicator which will compare the strength of a stock against SPY.
I have added the SPY data series to my code as below...
{
AddDataSeries("SPY", Data.BarsPeriodType.Tick, 1, Data.MarketDataType.Last);
}
In the calculation I want to compare the close of the current bar of SPY against the previous bar of SPY. If I used close[0] this would use the data value from the stock as the primary instrument, not SPY as the second instrument.
How can I call the closing price of SPY for the current bar and the previous bar?
Thanks,
Neil

Comment