Start from specific datetime bar in MT5 and step forward



I have an EA which i gather information I need (Bar information and iMACD for example) and send it back to python for calculation and as what to do.

I want to add a function that when I star EA, sync the data with python. here I explain more:

python send the date and time of the last bar that has stored in its database to the EA, and ask for the data (bar by bar) that exists on MT until current Bar (Last Bar).

in this scenario I need that EA to get the start date and time and show every bar information (including high, low and iMACD) and print it (I'll send it back to python instead of printing).


1- go to specific bar

2- gather bar and indicator information that exists in MT (already downloaded before)

3- print gathered information

4- go to next bar (this is my problem that I need help with)