Get the current bar using python and MT5
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
I'm trying prices = mt5.copy_rates_from("EURUSD", mt5.TIMEFRAME_M5, today, 10)
but this doesn't return the current bar, as it seems to have a delay of 2 hours.
how could i do day trade without this information ?
or maybe i must to create the code and develope a robot operation with meta editor ?
Use copy_rates_from_pos instead.
start_pos
[in] Initial index of the bar the data are requested from. The numbering of bars goes from present to past. Thus, the zero bar means the current one. Required unnamed parameter.
- www.mql5.com
i would like to thank you!
very kind, thank you
Hi all, could you give me a tip on how to get the current bar in python using the MetaTrader5 library?
I'm trying prices = mt5.copy_rates_from("EURUSD", mt5.TIMEFRAME_M5, today, 10)
but this doesn't return the current bar, as it seems to have a delay of 2 hours.
how could i do day trade without this information ?
or maybe i must to create the code and develope a robot operation with meta editor ?
thank for your support