darwinex / dwx-zeromq-connector

Wrapper library for algorithmic trading in Python 3, providing DMA/STP access to Darwinex liquidity via a ZeroMQ-enabled MetaTrader Bridge EA.
https://blog.darwinex.com/zeromq-interface-python-r-metatrader4/
BSD 3-Clause "New" or "Revised" License
342 stars 227 forks source link

Adding an example showing how to work with indicators inside the strategy file on a different time frames #78

Closed Nariman-Git closed 3 years ago

Nariman-Git commented 4 years ago

It would be great if you could add one simple python example to show how to integrate an indicator inside the strategy file and make a trading decision based on that? Something similar to the existing Coin Flip Trader, but, incorporating at least one indicator operating on a , for instance, 15 min time frame ticker.

Very much appreciated for being such helpful

1Eve commented 4 years ago

I would love that inorder to use zeromq_connector to code my strategies which involve indicators available in MT4

elvinex commented 3 years ago

Hi, generally there are two ways. Either you could calulate it in python from the price data you stored, for example using the resample function on a pandas data frame. Or you could do it in mql and pass the information via the socket connection similar to how it is done for example for DWX_GetOpenOrders(). However, this would be quite a lot of work. If a strategy is based mostly on technical indicators, I would highly recommend just to code it in mql4 and execute it directly in MT4.