[Need help] - About using MT4 as front-end in Forex system.

 

Hi there,

I'm working in one of Forex companies in the world :-)

Currently our FX system is using Flex as top UI level that provides functionality for end-users for making transactions including placing/executing orders, querying rate history etc. In other words, users can do everything via Flex layer. The Flex is embedded in .jsp web pages.

The Flex layer interacts with Java web-based layer using Struts framework. All requests made by Flex should be sent to the Struts layer (using e4x, text and XML format) and then, they will be analysed and sent to other underlying layers (that being in charge of applying business processes on data) to be executed after that.

Now we're thinking about potential using Smart-Client application as part of our current system. We're learned that Meta Trader is a strong full-cycle trading platform that includes front-end terminal. So we have a few questions around these:

- Is it possible to use MT as replacement of our current Flex layer? If yes, please let me know which APIs are available for use such as getting rate, order execution, querying history etc. and how to implement them? If it's too long to write an explanation on this, could you please send me related links to the documents as my further references? We expect keeping the Struts layer intact and the MT will do the same as Flex.

Thank you for your help!

Vinh Nguyen

 

Hi, first of all Flex UI will be most likely more User Friendly and then mt4. Mt4 is very easy to understand but you will not be able to change anything on mt4 ui. If you are talking about replacing flex layer, then you want to route the orders through other brokers and keep all layers behind flex/mt4 still?

Also check out this

 
fx1.net:

Hi, first of all Flex UI will be most likely more User Friendly and then mt4. Mt4 is very easy to understand but you will not be able to change anything on mt4 ui. If you are talking about replacing flex layer, then you want to route the orders through other brokers and keep all layers behind flex/mt4 still?

Also check out this


Absolutely. Due to my customer prefers using MT4 instead of Flex so we need to find a way to integrate MT4 with our current Forex system but only replace Flex layer. I guess that MT4 throws APIs so that we can let it communicate with our nearest Struts layer, right? Currently the Flex layer is sending all requests to Struts in XML end Text (associated with GET and POST method) format. So I wonder if I can implement MT4 APIs to do the same things as Flex?

 

Actually it does not have much API available but its open for .dll imports. It will be easy to write little .dll which will be applied as EA to trade. Another question is: do you want your clients allow auto trading with mql or just screen trading? I personally think it will be possible to replace flex with mt4 in both cases with right tools.

In case screen trading : you have to write little tool (EA) which will collect orders and send them via third party .dll to struts server.

in case automated trading: you may offer an API to your clients they replace order send routines or simply use same EA from #1 case

Other question is of course: in case you give mt4 to your customers they will automatically know about mt4 possibilities and brokers (they will get demo account to be able to trade at all). you may loose your client base to mt4 brokers.

 
Most likely easiest way is to apply up with metaqueotes and get mt4 friendly broker, this way you dont have to do that much efford, all orders will routed directly to your desk.
 
fx1.net:

Actually it does not have much API available but its open for .dll imports. It will be easy to write little .dll which will be applied as EA to trade. Another question is: do you want your clients allow auto trading with mql or just screen trading? I personally think it will be possible to replace flex with mt4 in both cases with right tools.

In case screen trading : you have to write little tool (EA) which will collect orders and send them via third party .dll to struts server.

in case automated trading: you may offer an API to your clients they replace order send routines or simply use same EA from #1 case

Other question is of course: in case you give mt4 to your customers they will automatically know about mt4 possibilities and brokers (they will get demo account to be able to trade at all). you may loose your client base to mt4 brokers.


Thanks for your answer!

About your very first question, our current system delegates auto trading to other server layer. So we only need MT4 for screen trading (user defines execution conditions on his orders and they will be processed automatically at server side, MT4 should only display execution status). Anyway, does MT4 expose any API in Java so that we can concrete them by using Java IDEs such as Eclipse? I'm thinking about using .jar instead of .dll to pass order information to the Struts Layer.

 
i am not fimilar with java operations but you may take a look at https://www.mql5.com/en/forum/121466 . About showing execution status is easy i think on display with Draw objects like LABELS. But you may have another problem with prices and charts. you have to offer your customers price and charts from your server, its possible to apply external data but it may get very inaccurate when it ticks very fast, because of too many layers between mt4 and your servers (over 2 layers, scripts, internet, servers). Dont you think mt4 implementation cause too many problems you have to workaround and loose valuable execution, data time for serious trading?
 

Hi Taskin,

Did you meant that customizing UI of the MT4 is impossible? I wish I can at least add one more execution condition into the Order placement dialog and expect that the MT4 will handle all conditions that I defined. For example: if the price downs to level 1, MT4 should automatically buy 5.00 volume of goods. And then if the price raises to level 2, the MT4 will sell all volume that it bought before, of course, automatically too.

Regards,

 
You would have to run an MT4 server on your servers and do the bridging server side. This is the only way it is meant to be used. You should contact MetaQuotes directly to ask them about what possibilities there are to connect mt4 server to your own backend and how much the license will cost and what are the terms and conditions. This here is an end user forum for client side scripting and I doubt that you will find many people here who have already run their own MT4 brokerage and would share their experience.
 
Seconded. The server has the functionality u r looking for. See here -> https://www.metaquotes.net/en/metatrader4.
 

Thank you :-)

I have just raised my questions to the MetaQuotes Support. Hopefully, I will receive their answers soon.

See ya around.