In the EMA snippet, prev_ema is assigned from two always_ff blocks: reset in stage 1 and feedback in stage 3. I would give that register one owning block, then carry tick_valid and the corresponding price through the same pipeline as the EMA result. A useful test is two adjacent ticks followed by a bubble, compared step by step with the software recurrence. Does the benchmark use this snippet or a separate implementation?
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.
In the EMA snippet, prev_ema is assigned from two always_ff blocks: reset in stage 1 and feedback in stage 3. I would give that register one owning block, then carry tick_valid and the corresponding price through the same pipeline as the EMA result. A useful test is two adjacent ticks followed by a bubble, compared step by step with the software recurrence. Does the benchmark use this snippet or a separate implementation?