'Is there a way to action a trade in MetaTrader upon receiving data from an api?
I was just wondering if it was at all possible to execute/action a trade on the MetaTrader platform upon receiving a signal or response from an api.
If someone could just point me to some documentation or even assess the feasibility of this for me, I would be extremely grateful as I cant seem to find any relevant to the topic.
Solution 1:[1]
You can try MetaApi https://metaapi.cloud cloud service which provides REST API and WebSocket API access to both MetaTrader 4 and MetaTrader 5 accounts.
Official REST API documentation: https://metaapi.cloud/docs/client
SDKs: https://metaapi.cloud/sdks (javascript, python and Java SDKs are provided as per April 2021)
It supports reading account information, positions, orders, trade history, receiving quotes, and accessing market data.
The service also provides copy trading API https://metaapi.cloud/docs/copyfactory and API to calculate forex trading metrics on a MetaTrader account https://metaapi.cloud/docs/metastats.
In regards to your use case you can use two methods to achieve the desired behaviour. First is to use MetaApi trade API and second is to use CopyFactory signal API. Both of these are available as REST API and via official javascript and python SDKs.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | roman |
