Hi,
I am a seasoned python programmer but a novice in all things FOREX and MT5.
I am trying to create a program to log the last closing position in an array for the purpose of creating an SMA and EMA indicator.
How can I access the last "CANDLESTICK" data that just immediately occurred (within seconds) and be able to see the CLOSING, HIGH and LOW using the python 'MetaTrader5' library?
NOTE:
If someone knows the answer as to how to do this on PYMT5ADAPTER library as well i would thank you for your response as I may be transitioning to this library.
Best Regards,
Hey guys, Thanks but i found my answer in the following
https://www.mql5.com/en/docs/integration/python_metatrader5/mt5copyratesfrompos_py
as such here is the line of code needed for the last candle position
![Documentation on MQL5: Integration / MetaTrader for Python / copy_rates_from_pos Documentation on MQL5: Integration / MetaTrader for Python / copy_rates_from_pos](https://c.mql5.com/36/47/documentation-on-mql5-integration__1.png)
- www.mql5.com
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I am a seasoned python programmer but a novice in all things FOREX and MT5.
I am trying to create a program to log the last closing position in an array for the purpose of creating an SMA and EMA indicator.
How can I access the last "CANDLESTICK" data that just immediately occurred (within seconds) and be able to see the CLOSING, HIGH and LOW using the python 'MetaTrader5' library?
NOTE:
If someone knows the answer as to how to do this on PYMT5ADAPTER library as well i would thank you for your response as I may be transitioning to this library.
Best Regards,