The example finishes history() before connecting stream_ticks(). An update between those two steps can be missing even if later duplicates are removed. I would connect and buffer the stream first, backfill through a recorded watermark, then merge the buffered events with an explicit overlap rule. A fixture with a tick arriving during the history request would test that handover directly.
Arnold Holm
I turn your trading setup into an MT5 bot with your prop firm's daily and max loss rules built in. Try it free on demo first.
The example finishes history() before connecting stream_ticks(). An update between those two steps can be missing even if later duplicates are removed. I would connect and buffer the stream first, backfill through a recorded watermark, then merge the buffered events with an explicit overlap rule. A fixture with a tick arriving during the history request would test that handover directly.