I finally got around to debugging my base class to see exactly what the problem was and why I couldn't run the thing in Market Replay. It took about four hours but I finally figured it out.
GetUnrealizedProfitLoss() does not like the Market Replay at all. It doesn't care if you call it in OnBarUpdate() or OnExecutionUpdate(). It will hang the MR regardless and you will never know that it isn't the Market Replay because GetUnrealizedProfitLoss() works just fine in a live environment and there is nothing appearing in the Log output.
To reproduce, bring up any instrument in any time frame on a chart and drop the attached strategy - which is an editable version of the stock SampleMACrossOver - on that chart. I have GetUnrealizedProfitLoss in both OnBarUpdate() and OnExecutionUpdate(). You can comment one and uncomment the other and run it in Market Replay. It will hang the Market Replay just as sure as the sun rises.
Comment