The same code ( positions_get ) run from jupyter notebook works fine. I can't understand why the error when running the code in the terminal and through 'Python 3.9 (64-bit)'
Documentation on MQL5: Integration / MetaTrader for Python / positions_get
- www.mql5.com
positions_get - MetaTrader for Python - Integration - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
I solved my problem - my python script on my computer was not in 'UTF-8' encoding. I converted this file to 'UTF-8' using 'Noteepad++' and it worked.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
My settings:
I'm trying to run in MetaEditor the code from positions_get documentation
In MetaEditor I am getting the error
If I run 'Python 3.9 (64-bit)', I see that the cursor does not exit the 'if' loop
And it should be like this:
Any idea why the cursor doesn't leave the 'if' loop?