Version 2 has a defect. This is what we observed; we changed nothing in your
source.

On a live chart (EURUSD, M15, about 100,000 bars) version 2 draws the EMA
line and the expected arrows.

In the MetaTrader 5 Strategy Tester it draws the EMA line but not a single
arrow, and it raises no alert. We loaded it from an Expert Advisor with
iCustom, read buffers 0 and 1 with CopyBuffer on every tick and ran three
months of real ticks (EURUSD, M15, 1 July to 29 September 2026). Version 1
showed 109 signals in the same test. For version 2, BarsCalculated() of the
indicator stays at 0 for the whole test.

In the tester the chart history and the higher-timeframe history begin on
the same date (2 January 2025). No error is printed in the journal.

Find the cause and fix it. Explain the cause in two or three sentences, then
give the complete source of version 2.1 in one file. All rules stay as they
are. Do not claim that you compiled or tested the code.
