Subscribe to live ticks in Python - bug in documentation?

 

The example code on this page does not work


https://www.mql5.com/en/docs/integration/python_metatrader5/mt5marketbookget_py


AttributeError: module 'MetaTrader5' has no attribute 'market_book_add'




I was looking to a way to subscribe to live ticks in Python....

Documentation on MQL5: Integration / MetaTrader for Python / market_book_get
Documentation on MQL5: Integration / MetaTrader for Python / market_book_get
  • www.mql5.com
market_book_get - MetaTrader for Python - Integration - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

Probably you have an outdated MT5 package.

Try from the command line:

pip install metatrader5 --upgrade


 
I did this but it didn't work the first time, guess I"m not great with python.
Uninstalled and reinstalled and it works, thanks,
 

Ok next issue is that nothing seems to be outputting, and it is erroring instantly but the error is Success??



 

I checked on

 2021.07 . 23 07 : 50 : 27.755 Python  MetaTrader5 package version :   5.0 . 34

, trade server

 2021.07 . 23 06 : 25 : 42.574 Terminal        MetaTrader 5 x64 build 3003 started for MetaQuotes Software Corp.


The example ( https://www.mql5.com/en/docs/integration/python_metatrader5/mt5marketbookget_py ) worked without errors.

Documentation on MQL5: Integration / MetaTrader for Python / market_book_get
Documentation on MQL5: Integration / MetaTrader for Python / market_book_get
  • www.mql5.com
market_book_get - MetaTrader for Python - Integration - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
MT5 build 3003 is beta, right? Try the release version.
 
I have the same issue exactly? did we reach any solution for this?
 
Hi I Have the same error " AttributeError: module 'MetaTrader5' has no attribute 'EA_Setup" but when i use re install it and insyall metatrder5 it didn't work i attached my script.
Files:
Reason: