I am using a charting software similar to MetaStocks for creating buy and sell signals. The software can exchange Date via DDE.
So I am searching a way to translate the signal of the software, which would be for example "EURUSD:Enter LONG", into an order for MT4. Maybe through DDE or a DLL.
In the sript I can change Lot size and other parameters for the order.
Is anybody able to write a script for this?
MT4 only has DDE server capabilities but not DDE client (so it can only send via DDE but not receive). A DDE client can be implemented in a DLL and used in experts.
I am using a charting software similar to MetaStocks for creating buy and sell signals. The software can exchange Date via DDE.
So I am searching a way to translate the signal of the software, which would be for example "EURUSD:Enter LONG", into an order for MT4. Maybe through DDE or a DLL.
In the sript I can change Lot size and other parameters for the order.
Is anybody able to write a script for this?
This is possible, but not simple. It would require fairly deep programming experience (MQL and Microsoft).
You would have to write an intermediate DDE broker. MetaStocks would send the buy/sell signals to the DDE broker, and MT4 would poll the broker for the signals. You could write an MT4 EA that made external calls to a DLL (http://www.metatrader.info/node/39) and the DLL would do the DDE heavy lifting. There would be some lag as the MT4 EA start loop is only called when it receives bid/ask from the broker, but the lag shouldn't be too bad. This lag might make it unacceptable for a tick scalping system, but most other strategies would be fine.
I'm not familiar with MetaStocks, but it may be possible to skip the DDE broker entirely by having MetaStocks log buy/sell orders to a flat file. The MT4 EA could poll the file for the orders. I know it's crude, but I'm not much of a fan of "elegant" solutions when something simple works. Also, the same lag issues as the DDE broker solution.
This is possible, but not simple. It would require fairly deep programming experience (MQL and Microsoft).
You would have to write an intermediate DDE broker. MetaStocks would send the buy/sell signals to the DDE broker, and MT4 would poll the broker for the signals. You could write an MT4 EA that made external calls to a DLL (http://www.metatrader.info/node/39) and the DLL would do the DDE heavy lifting. There would be some lag as the MT4 EA start loop is only called when it receives bid/ask from the broker, but the lag shouldn't be too bad. This lag might make it unacceptable for a tick scalping system, but most other strategies would be fine.
I'm not familiar with MetaStocks, but it may be possible to skip the DDE broker entirely by having MetaStocks log buy/sell orders to a flat file. The MT4 EA could poll the file for the orders. I know it's crude, but I'm not much of a fan of "elegant" solutions when something simple works. Also, the same lag issues as the DDE broker solution.
Some time ago I wrote an MT4 EA to read a flat file as described above. See http://paulsfxrandomwalk.blogspot.com/2009/12/crude-api-for-metatrader-4.html
Paul
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
So I am searching a way to translate the signal of the software, which would be for example "EURUSD:Enter LONG", into an order for MT4. Maybe through DDE or a DLL.
In the sript I can change Lot size and other parameters for the order.
Is anybody able to write a script for this?