Inaccurate MT5 OHLC data. Howto get accurate data

 

I'm performing optimization on MT5 Strategy Tester using H4 Open Prices Only.
It's obvious my data is not accurate, as the number of ticks isn't the same for all 28 pairs which are read on every tick.

I printed the iTime for each bar for all 28 pairs on the same line from June 2020 to December 2020, the bars are not in sync.

My strategy depends on all bar being in sync, no missing bar.


How do I get clean data for MT5 backtesting/optimisation?
Your suggestions are apreciated.

ICMarkets Live account
2020.12.14 14:54:52.147    Core 1    AUDCAD: generate 1886 ticks in 0:00:00.047, passed to tester 3222 ticks
2020.12.14 14:54:52.147    Core 1    AUDCHF: generate 1887 ticks in 0:00:00.046, passed to tester 3219 ticks
2020.12.14 14:54:52.147    Core 1    AUDJPY: generate 1886 ticks in 0:00:00.032, passed to tester 3222 ticks
2020.12.14 14:54:52.147    Core 1    AUDNZD: generate 1887 ticks in 0:00:00.047, passed to tester 3215 ticks
2020.12.14 14:54:52.147    Core 1    AUDUSD: generate 1890 ticks in 0:00:00.046, passed to tester 3221 ticks
2020.12.14 14:54:52.147    Core 1    CADCHF: generate 1883 ticks in 0:00:00.032, passed to tester 3202 ticks
2020.12.14 14:54:52.147    Core 1    CADJPY: generate 1887 ticks in 0:00:00.046, passed to tester 3224 ticks
2020.12.14 14:54:52.147    Core 1    CHFJPY: generate 1886 ticks in 0:00:00.031, passed to tester 3217 ticks
2020.12.14 14:54:52.147    Core 1    EURAUD: generate 1889 ticks in 0:00:00.047, passed to tester 3225 ticks
2020.12.14 14:54:52.147    Core 1    EURCAD: generate 1886 ticks in 0:00:00.047, passed to tester 3216 ticks
2020.12.14 14:54:52.147    Core 1    EURCHF: generate 1888 ticks in 0:00:00.031, passed to tester 3209 ticks
2020.12.14 14:54:52.147    Core 1    EURGBP: generate 1885 ticks in 0:00:00.031, passed to tester 3215 ticks
2020.12.14 14:54:52.147    Core 1    EURJPY: generate 1885 ticks in 0:00:00.047, passed to tester 3220 ticks
2020.12.14 14:54:52.147    Core 1    EURNZD: generate 1889 ticks in 0:00:00.031, passed to tester 3222 ticks
2020.12.14 14:54:52.147    Core 1    EURUSD: generate 1888 ticks in 0:00:00.047, passed to tester 3222 ticks
2020.12.14 14:54:52.147    Core 1    GBPAUD: generate 1888 ticks in 0:00:00.047, passed to tester 3231 ticks
2020.12.14 14:54:52.147    Core 1    GBPCAD: generate 1884 ticks in 0:00:00.047, passed to tester 3219 ticks
2020.12.14 14:54:52.147    Core 1    GBPCHF: generate 1889 ticks in 0:00:00.047, passed to tester 3222 ticks
2020.12.14 14:54:52.147    Core 1    GBPJPY: generate 1888 ticks in 0:00:00.047, passed to tester 3230 ticks
2020.12.14 14:54:52.147    Core 1    GBPNZD: generate 1889 ticks in 0:00:00.047, passed to tester 3224 ticks
2020.12.14 14:54:52.147    Core 1    GBPUSD: generate 1888 ticks in 0:00:00.031, passed to tester 3225 ticks
2020.12.14 14:54:52.147    Core 1    NZDCAD: generate 1886 ticks in 0:00:00.047, passed to tester 3212 ticks
2020.12.14 14:54:52.147    Core 1    NZDCHF: generate 1886 ticks in 0:00:00.031, passed to tester 3207 ticks
2020.12.14 14:54:52.147    Core 1    NZDJPY: generate 1889 ticks in 0:00:00.078, passed to tester 3218 ticks
2020.12.14 14:54:52.147    Core 1    NZDUSD: generate 1888 ticks in 0:00:00.031, passed to tester 3211 ticks
2020.12.14 14:54:52.147    Core 1    USDCAD: generate 1888 ticks in 0:00:00.047, passed to tester 3218 ticks
2020.12.14 14:54:52.147    Core 1    USDCHF: generate 1885 ticks in 0:00:00.047, passed to tester 3216 ticks
2020.12.14 14:54:52.147    Core 1    USDJPY: generate 1888 ticks in 0:00:00.031, passed to tester 3220 ticks

MetaQuotes Demo account
2020.12.14 12:50:26.633    Core 1    AUDCAD: generate 1882 ticks in 0:00:00.125, passed to tester 3217 ticks
2020.12.14 12:50:26.633    Core 1    AUDCHF: generate 1883 ticks in 0:00:00.109, passed to tester 3205 ticks
2020.12.14 12:50:26.633    Core 1    AUDJPY: generate 1885 ticks in 0:00:00.250, passed to tester 3218 ticks
2020.12.14 12:50:26.633    Core 1    AUDNZD: generate 1883 ticks in 0:00:00.250, passed to tester 3222 ticks
2020.12.14 12:50:26.633    Core 1    AUDUSD: generate 1886 ticks in 0:00:00.110, passed to tester 3214 ticks
2020.12.14 12:50:26.633    Core 1    CADCHF: generate 1883 ticks in 0:00:00.125, passed to tester 3203 ticks
2020.12.14 12:50:26.633    Core 1    CADJPY: generate 1885 ticks in 0:00:00.110, passed to tester 3214 ticks
2020.12.14 12:50:26.633    Core 1    CHFJPY: generate 1884 ticks in 0:00:00.109, passed to tester 3210 ticks
2020.12.14 12:50:26.633    Core 1    EURAUD: generate 1885 ticks in 0:00:00.125, passed to tester 3212 ticks
2020.12.14 12:50:26.633    Core 1    EURCAD: generate 1882 ticks in 0:00:00.125, passed to tester 3210 ticks
2020.12.14 12:50:26.633    Core 1    EURCHF: generate 1883 ticks in 0:00:00.125, passed to tester 3208 ticks
2020.12.14 12:50:26.633    Core 1    EURGBP: generate 1885 ticks in 0:00:00.094, passed to tester 3223 ticks
2020.12.14 12:50:26.633    Core 1    EURJPY: generate 1886 ticks in 0:00:00.172, passed to tester 3211 ticks
2020.12.14 12:50:26.633    Core 1    EURNZD: generate 1884 ticks in 0:00:00.125, passed to tester 3214 ticks
2020.12.14 12:50:26.633    Core 1    EURUSD: generate 1888 ticks in 0:00:00.109, passed to tester 3215 ticks
2020.12.14 12:50:26.633    Core 1    GBPAUD: generate 1882 ticks in 0:00:00.125, passed to tester 3222 ticks
2020.12.14 12:50:26.633    Core 1    GBPCAD: generate 1884 ticks in 0:00:00.125, passed to tester 3214 ticks
2020.12.14 12:50:26.633    Core 1    GBPCHF: generate 1883 ticks in 0:00:00.125, passed to tester 3216 ticks
2020.12.14 12:50:26.633    Core 1    GBPJPY: generate 1883 ticks in 0:00:00.125, passed to tester 3219 ticks
2020.12.14 12:50:26.633    Core 1    GBPNZD: generate 1886 ticks in 0:00:00.125, passed to tester 3215 ticks
2020.12.14 12:50:26.633    Core 1    GBPUSD: generate 1887 ticks in 0:00:00.125, passed to tester 3217 ticks
2020.12.14 12:50:26.633    Core 1    NZDCAD: generate 1881 ticks in 0:00:00.110, passed to tester 3205 ticks
2020.12.14 12:50:26.633    Core 1    NZDCHF: generate 1885 ticks in 0:00:00.125, passed to tester 3209 ticks
2020.12.14 12:50:26.633    Core 1    NZDJPY: generate 1884 ticks in 0:00:00.125, passed to tester 3204 ticks
2020.12.14 12:50:26.633    Core 1    NZDUSD: generate 1886 ticks in 0:00:00.109, passed to tester 3206 ticks
2020.12.14 12:50:26.633    Core 1    USDCAD: generate 1886 ticks in 0:00:00.109, passed to tester 3221 ticks
2020.12.14 12:50:26.633    Core 1    USDCHF: generate 1879 ticks in 0:00:00.125, passed to tester 3209 ticks
2020.12.14 12:50:26.633    Core 1    USDJPY: generate 1887 ticks in 0:00:00.110, passed to tester 3218 ticks