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
DirectX Tutorial (Part I): Drawing the first triangle - the article
hi
in MetaEditor create python script, choose import metatrader5. in a window with text "import MetaTrader5 as mt5" i press "compilation" and get an error: "ModuleNotFoundError: No module named 'MetaTrader5'". so without writing a line of code i get an errorYou should first install the package before you can use it in your code — Documentation on MQL5: Integration / MetaTrader for Python
Installing the package from the command line:
I'm trying to install the package on a Mac and tried the commands
pip install MetaTrader5
python3 -m pip install "MetaTrader5"
and I get the errors
ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none)
ERROR: No matching distribution found for MetaTrader5
Is it because it's a Mac?
Hi, I'm trying to change the stop loss value and I'm receiving the following result:
OrderSendResult(retcode=10013, deal=0, order=0, volume=0.0, price=0.0, bid=0.0, ask=0.0, comment='Invalid request', request_id=0, retcode_external=0, request=TradeRequest(action=6, magic=0, order=0, symbol='', volume=0.0, price=0.0, stoplimit=0.0, sl=5461.5, tp=0.0, deviation=0, type=0, type_filling=0, type_time=0, expiration=0, comment='', position=214787925, position_by=0))
My request is shown above:
request = {
Can anyone help me?'action': mt5.TRADE_ACTION_SLTP,
'position': ticket_operacao_compra_longa,
'sl': novo_stop_compra,
}
result = mt5.order_send(request)
I'm trying to install the package on a Mac and tried the commands
pip install MetaTrader5
python3 -m pip install "MetaTrader5"
and I get the errors
ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none)
ERROR: No matching distribution found for MetaTrader5
Is it because it's a Mac?
Download python version 3.10.0 then try installing metatrader5.
here the link: https://www.python.org/downloads/release/python-3100/
after a longer pause i am trying to use MetaTrader5 in python:
i got the following error message:
i am using anaconda and updated my anaconda version
i also tried already pip install -U numpy
did not work
does anyone have an idea how to fix the problem?
thank you
Forum on trading, automated trading systems and testing trading strategies
New MetaTrader 5 platform build 2085: Integration with Python and Strategy Tester improvements
Fernando Carreiro, 2023.02.26 00:03
The documentation has changed. Here is the correct link: Documentation on MQL5: Python Integration