Hi you, I need your help! Be my Patron, let’s make it possible!
Channel:
English version – Versão Inglês:
Portuguese version – Versão Português:
Paid version with 38 indicator:
I believe that development in PYTHON is easier and simpler to make an Expert Advisor or any other tool that helps you to make a decision when related to the stock market.
So, I built a library in Python that makes it easy and simple to make expert advisors. It is possible to find it here:
This MQL5 Service uses Socket communication to send and receive data.
This MQL5 Service is the “Client-Side”, so it will only work if there is a server-side sending data to it, asking for some Indicator.
An example of Expert Advisor using sockets can be found here:
However, there are some difficulties when using python to code an expert advisor, one of these difficulties is the Indicator usage, most of it does not exist yet.
To solve that problem you can:
You can recreate all the indicators.
You can use a library that has some or all the indicators.
You can communicate through the Metatrader5 asking for the indicator data.
[spoiler title=”Read More…”]
You can recreate all the indicators.
You can use a library that has some or all the indicators.
You can communicate through the Metatrader5 asking for the indicator data.
This MQL5 Service uses the indicators that are already built on Metatrader5, it just asks for the data, informing the setup first, and the service responds to it.
This service only works with a few indicators:
Bollinger Bands
MACD
Moving Average
OBV On Balance Volume
Stochastic
Bollinger Bands
MACD
Moving Average
OBV On Balance Volume
Stochastic
I built the communication using the same pattern used on MetaTrader5:
The address and the port must be the same on the MQL5 Service and in the python code.
To use a service you just need to go in service, and a new one, it is near the expert advisor folder, at the button, on MetaTrader 5.
Image 1
You can use as many services you want until you reach the “Activation” limits.
Image 2
When using more than one service they might conflict, changing the port is a solution.
To be able to send data out of MetaTrader5 you first need to allow it, the “localhost” needs to be added.
Tools -> Options -> Expert advisors -> WbRequest (checkbox)
Tools -> Options -> Expert advisors -> WbRequest (checkbox)
Image 3
It is good to know that I built that Service to work only in the “localhost.”
If you are in doubt, it uses sockets to work.
It is possible to call the same indicator with a different setup of how many times you want. However, when using too many indicators it might reduce performance.
You can see the expert advisor using indicator here:
All the indicators are defined to work with a time frame of one minute, to change it you just need to change the “time_frame.”
All the indicators have comments to make it easy to understand and know how to use it.
Image 4
If you are having any trouble, please send me a direct message, I will be pleased to help you.
[/spoiler]