Been lurking for a while and finally decided I'd make a post. I am trying to figure out the way data is loaded and read in NinjaTrader.
Question 1
My first question is really an issue I can't seem to get around that has to do with multi-instruments. When I only have instrument on the chart and enable my strategy, everything works fine and looks like this:
Single Instrument Loaded

When I add a second instrument using Add("ES 03-12", PeriodType.Day, 1);, NO MATTER how I use BarsInProgress or anything else I've tried to do, it always looks like this:
My goal was to create an indicator or a method within a strategy that would allow me to generate entry/exit signals based on on calculating something using another indicators price/volume data.
Two Instruments Loaded

I eventually found out that you can set the BarsIndex with a the entry/exit methods, but that didn't work either. So any help with this would be appreciated.
Question 2
How does data (price data, indicator data, etc) get loaded in relationship to NinjaScript? If I have a chart open and I enable the strategy, does one bar load and then strategy code is executed to see if signal exists, then next bar gets loaded and code is executed again? Or does all the Bar Data get loaded first, then the strategy code goes through each bar and see if it should generate a signal?
My question arises from the use of a method that requires comparing bars to one another. For example, say I create a method to calculate Spread using High[0] - Low[0] and then call it from OnBarUpdate(), does NT understand, that I want it to calculate spread on each bar and not just the last one?
Any and all input will be greatly appreciated! I am fairly new to C# and NinjaTrader so I'm still learning a lot.

Comment