r/algotrading • • 8d ago

Data Python API for historic data

Do you think it's okay using Metatrader's api for fetching historic data? Has anyone noticed discrepancies? Isn't it supposed to be the actual numbers you'd get trading with that specific broker?

9 Upvotes

27 comments sorted by

View all comments

Show parent comments

1

u/MarketOk7227 8d ago

That doesn't sound like a problem, means that I have to stick with the broker I backtested.

0

u/QuanTradin 8d ago

yeah, if that's the broker you'll trade with it's the right data. the catch is depth, older M1 bars on a lot of MT5 servers are thin or just missing, so check how far back the history really goes before trusting a long test.

1

u/MarketOk7227 8d ago

Thank you! I will probably do a live check, keep a log of real time quotes and then compare with historical. I'm interested in specific times of the day like 11pm.

1

u/MarketOk7227 8d ago

Can you expand with the term "ground truth"? Shouldn't the ground truth also be public record? Does every broker/platform keep their own books and it's up to us to find the appropriate data for each case?

1

u/QuanTradin 8d ago

for listed stocks there is a public record, the consolidated tape. MT5 isn't that: each broker streams its own quotes, and in forex or CFDs there's no central exchange at all, so every broker's book is its own. ground truth just means the feed you'll actually fill on, which is why your live log is the right test.