I believe I know the answer to this (because I just ran a small test)... but I wanted to repeat my thoughts, and get a nod from the NT guys, make sure I'm not missing anything.
- I add multiple symbols/timeframes in my strategy... sometimes, I even add the same symbol multiple times. (I do this in case I start tracking multiple positions in the same stock, but at different starting points.)
Add("GOOG", PeriodType.Minute, 30); // barsinprogress = 1
Add("GOOG", PeriodType.Minute, 30); // barsinprogress = 2
- OnBarUpdate() is called for every bar. In the above case, barsinprogress = 1 and 2 on 30.
- All of the other order events all track correctly to the barsinprogress it belongs to. (Really impressive how well/cleanly that works, guys.)
- Now here's the question/tricky part. It looks to me like OnMarketData() does *not* work this way. I only get one OnMarketData() call per *symbol*, regardless of the number of times it's added in the strategy.
The barsinprogress value that comes back is = the first bar with matching symbol.
I can see why the behavior would look like that, and I think I can work around it. I just wanted to make sure I wasn't missing anything
Comment