
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
Practical application of neural networks in trading. Python (Part I) - the article
New version of MetaTrader5-Python-5.0.34 available for MetaTrader 5 build 2765
Functions added market_book_add, market_book_release, market_book_get
Hi,
I python programers and I now find python module metatrader5
I trying simple test, bud cannot get value from symbol:
I trying in jupyter:
but problem is:
where I have bug?
Thanks
EDIT:
I trying also from script with the same - cannot select the symbol :(
Hi all,
I'm facing an issue with the OrderSendResult structure returned after an order_send() request using the Python API. One of the fields returned is the "comment", which should contain broker's comment to operation. However, this field is returning the same comment that was passed to the request, and not the broker return, as it should.
To reproduce the bug do the following:
1. Create a request that will generate a comment as a result. Fill the request "comment" with a dummy commentary.
2. Send the request using the order_send() command from the Python API.
3. On the OrderSendResult object returned, check the "comment" field.
The "comment" field will have the same comment passed, when it should have the comment returned by the broker, which can be checked in the Journal tab of the MT5 Terminal.
Can someone confirm this? Is there any workaround to get the broker's comment?
Forum on trading, automated trading systems and testing trading strategies
MetaTrader 5 Python User Group - How to Use Python in Metatrader
Rashid Umarov , 2021.02.15 17:07
Added
ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none)
ERROR: No matching distribution found for MetaTrader5
I couldn't install MetaTrader5 using pip install. The error was as below.
Anyone can help me? Thanks a lot.
Uninstall your Python from PC.
Download the latest version of Python and double clic to start installation.
Select the Add to path option like the link below indicate.
Run the pip install by Windows Prompt.
Enjoy
https://datatofish.com/add-python-to-windows-path/
New version of MetaTrader5-Python-5.0.34 available for MetaTrader 5 build 2765
Functions added market_book_add, market_book_release, market_book_get
Hi, the function maket_book_add doesn't seems to trigger internal MT5 OnBookEvent. Is that correct?
I'm trying to communicate between MT5 and Python via sockets when a new BookEvent arrives (as Python doesn't have access to Events), but it's not working. The event was never triggered inside of MetaTrader.
Python receives book data normally with mt5.market_book_get.
Steps to reproduce:
1. Run an EA just printing a new BookEvent (code attached below)
2. Run a Python script that connects to MetaTrader and do a market_book_add on any symbol (code attached below)
3. Check on Metatrader experts log if something is printed.
EA code:
Python code:
Thanks in advance,
Daniel
Hi, the function maket_book_add doesn't seems to trigger internal MT5 OnBookEvent. Is that correct?
I'm trying to communicate between MT5 and Python via sockets when a new BookEvent arrives (as Python doesn't have access to Events), but it's not working. The event was never triggered inside of MetaTrader.
Python receives book data normally with mt5.market_book_get.
Steps to reproduce:
1. Run an EA just printing a new BookEvent (code attached below)
2. Run a Python script that connects to MetaTrader and do a market_book_add on any symbol (code attached below)
3. Check on Metatrader experts log if something is printed.
EA code:
Python code:
Thanks in advance,
Daniel
What you have output from this code?
What you have output from this code?
selected is always true to me.
It goes through until the end of code, it prints the book.
But the OnBookEvent was never triggered inside MT5.
Practical application of neural networks in trading. Python (Part I) - the article
Practical application of neural networks in trading (Part 2). Computer vision