Without understanding what is there under the hood, DirectX is perplexing: "Why is it so difficult and confusing, can't it be made simpler?" And this is only the first stage. Further, you come to study the HLSL shader language and the peculiarities of video card programming. In order to avoid all these confusions, I suggest considering the internal structure of DirectX, though not going too deep into detail. Then we will write a small script in MQL that displays a triangle on the screen.
It is an introductory article on DirectX, which describes specifics of operation with the API. It should help to understand the order in which its components are initialized. The article contains an example of how to write an MQL5 script which renders a triangle using DirectX.
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 error
Alex Vitkovski #: hiin 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 error
Release Date: Oct. 4, 2021 This is the stable release of Python 3.10.0 Python 3.10.0 is the newest major release of the Python programming language, and it contains many new features and optimizations. Major new features of the 3.10 series, compared to 3.9 Among the new major new features and changes so far: PEP 623 -- Deprecate and prepare for...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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