I am getting the following exception in RC2 when running a strategy:
- multi-instrument strategy;
- depending on the conditions, on first tick OBU for the primary series uses MessageBox.Show;
- exception is then thrown and strategy disabled/relevant chart remains frozen;
- MessageBox.Show is the offending code, if it is removed, no exception is thrown;
- exception is thrown in real time for a sim account, however, in MarketReplay, no exception is thrown.
I suspect that the Add method causing the exception is called for BarsArray[>0] trying to add the newly closed bar but the core bars data remains locked as OBU for BarsArray[0] is still waiting for the dialogue to close. With regard to the MarketReplay situation, it is possible that all dataseries are run from the the same thread (I have not checked), so a normal wait for MessageBox.Show to return occurs.
I do now know if this behaviour is a necessary consequence of NT core implementation or something that can be worked around. I suspect some users might want to have the ability to have modal interaction built in in OBU.
In any case, please could you let me know if there is a way around the exception (ie, to wait for user input and yet not cause thread lock error for other dataseries).
Thank you,
Roman
Comment