Download MetaTrader 5

MT4 PHP API

To add comments, please log in or register
Agon
29
Agon  

Hello there,

I am Agon Xheladini web developer.

My client is an forex trader/broker and i have developed an website for him.

What he wants now is to display his MT4 results and history at his website.

Since i am new with this problem it will be good if someone gives me infos on that how to develop an api that will communicate with MT4 and take those date from them to display on our website.

Kind Regards

Agon.Xh

gordon
2328
gordon  
axheladini:
[...] What he wants now is to display his MT4 results and history at his website. [...]
MT4 has built-in facilities for publishing reports to a FTP account -> 'Publisher' tab in 'Options' (Ctrl + o). You can search for more info -> https://www.mql5.com/en/search.
Agon
29
Agon  
gordon:
MT4 has built-in facilities for publishing reports to a FTP account -> 'Publisher' tab in 'Options' (Ctrl + o). You can search for more info -> https://www.mql5.com/en/search.

Yes I know that tab, but the problem that we want to develop an api for that, he has more accounts and dont have access to all of those accounts.
gordon
2328
gordon  
axheladini:

[...] he has more accounts and dont have access to all of those accounts. [...]

If he doesn't have access to them then there is not much that can be done, no?

The bare minimum is the account number, pass and server details for each... No way around that. API or not.

Agon
29
Agon  
gordon:

If he doesn't have access to them then there is not much that can be done, no?

The bare minimum is the account number, pass and server details for each... No way around that. API or not.

There is a back office where all those accounts can login and also there is an setting part where they can give their details (account number, pass,..) and this api should display their results on this back office.

By the way i just want to create an php api to communicate with MT4, do you have any informations if i can do this or not ?

gordon
2328
gordon  

axheladini:

[...] i just want to create an php api to communicate with MT4, do you have any informations if i can do this or not ?

I am not aware of any PHP API for MT4. It might be possible to create such an API, but the functionality u are asking for does not exist in MT4 in the first place - u can't log into different accounts via MQL4 (it's not supported natively). So u also can't automatically publish from different accounts from within a single Terminal. I imagine this sort of functionality exists in the MT4 server/back-end... U need to talk to MetaQuotes about that.

Agon
29
Agon  
gordon:

I am not aware of any PHP API for MT4. It might be possible to create such an API, but the functionality u are asking for does not exist in MT4 in the first place - u can't log into different accounts via MQL4 (it's not supported natively). So u also can't automatically publish from different accounts from within a single Terminal. I imagine this sort of functionality exists in the MT4 server/back-end... U need to talk to MetaQuotes about that.


How to talk with that ?
gordon
2328
gordon  
axheladini:

How to talk with that ?
https://www.metaquotes.net/en/company/contacts
Agon
29
Agon  

Thank you gordon, i just contacted them. I will write here once i have some mail from them.
Kamal Ibrahim
22
Kamal Ibrahim  

Please me too have same problem, I have made my own website for providing signals but I don't know can I connect mt4 to my website by the way in which I open position on mt4 it appears on my website on members area, please if anyone have idea about that, help me


Thanks

Giovanni Passali
5
Giovanni Passali  
kamalzakhoy:

Please me too have same problem, I have made my own website for providing signals but I don't know can I connect mt4 to my website by the way in which I open position on mt4 it appears on my website on members area, please if anyone have idea about that, help me


Thanks

I can solve your problem.

To solve the problem, it needs to write 3 software:
- an EA in MQL4 to write in file the open positions in dedicated folder;
- a software that reads this file and send the open position to web site;
- a software in PHP that receive this data and save it on db MySql

I can also write the php page that read this data in db MySql and publish it.

It's a work.

123
To add comments, please log in or register