Download MetaTrader 5

calling mq4 from C#/C++/Java

To add comments, please log in or register
Josip Istuk
2850
Josip Istuk  
Hi, how can I call mq4 from my c/c#/c++/Java program? I need call functions like iRsi(...), iMACD etc.
Andy
568
Andy  

implementation of such indicators in MT is not ideal, hence it is hard to understand why you want to use indicators provided exactly with Meta Trader, so at the moment i can suggest only such options :

1. [EASY WAY] there are several open source libraries that provide much wider list of different indicators, thus i would recommend to look at implementation of such indicators in R studio, you can call different R methods from your C# code 

http://blog.fosstrading.com/2009/04/testing-rsi2-with-r.html

http://stackoverflow.com/questions/5576456/is-there-a-way-to-call-r-functions-from-c-sharp-and-retrieve-the-result-in-c-sha

2. [HARD WAY] you can create custom EA in MT and using e.g. Named Pipes exchange some information between this EA and your C# program, when it is already implemented then you will be able to send commands from C# to EA, e.g. dynamically add some indicator to the chart

https://www.mql5.com/en/articles/115

https://www.mql5.com/en/articles/503

http://www.forexfactory.com/showthread.php?t=347503

Josip Istuk
2850
Josip Istuk  
Thanks a lot for these hints. Very interesting!
To add comments, please log in or register