Redirect Signals from MT4 to website table

 
I'm interested in having my own signal service but I have a strategy that I've built into an EA that will send off signals for me. The question I have here is how can I redirect the signals being sent from MT4 to my websites table? 

I have a developer but he asked "Does MT4 provide an API for the data?" 

quite ignorant when it comes to coding things like this so I thought I'd come here for an answer 

thank you



Attached is a web table of which I speak of 
 
Yes several ways but it needs a lot of coding to get it just right.
 
johntaylor1:
I'm interested in having my own signal service but I have a strategy that I've built into an EA that will send off signals for me. The question I have here is how can I redirect the signals being sent from MT4 to my websites table? 

I have a developer but he asked "Does MT4 provide an API for the data?" 

quite ignorant when it comes to coding things like this so I thought I'd come here for an answer 

thank you



Attached is a web table of which I speak of 

I would let your EA write everything to a local file and have a local Powershellscript that composes the actual web-page (your table) and post that onto the (remote?) websever...

 
Marco vd Heijden:
Yes several ways but it needs a lot of coding to get it just right.
thank you, we know it will need loads of code, just trying to figure out how to do it
 
Carl Schreiber:

I would let your EA write everything to a local file and have a local Powershellscript that composes the actual web-page (your table) and post that onto the (remote?) websever...

thank you 

do you mind explaining in a little more detail 

Thank you so much
 
johntaylor1:
thank you 

do you mind explaining in a little more detail 

Thank you so much

Well,

  1. you need to know html or take a html-page with a table and modify it acc. to what you want,
  2. you have to know PowerShell (somewhat similar to Perl a native linux script language),
  3. so with PowerShell commands open and read the file from your EA and create/write the web-page,
  4. at the end upload this page with PowerShell commands on your server.

Look (google) for existing code in the net.

Beside that you can write the whole page in your EA and post it with WebRequest - there seems to be scripts: https://www.mql5.com/en/code/12296.

But I don't know whether this works in mt4 - I have read about problems using 'post'.

Automatic Posting with WebRequest()
Automatic Posting with WebRequest()
  • votes: 26
  • 2015.01.19
  • MetaQuotes Software Corp.
  • www.mql5.com
An example of posting a message containing an image on the MQL5.com website using the WebRequest() function. This is an example of how to authorize using a login and a password, and to insert an image into a text message.
 

You can also do in your EA to send signals in a format such as JSON through WebRequest() POST. For example the following type:

{

"asset":"AUDUSD.lmx","provider":"LMAX-DemoUK","expiration":900,"trade":"SELL","status":"VALIDATE",

"openedAt":"2016-09-02 12:30:00","closedAt":"2016-09-02 13:15:00","bid":0.75911,"ask":0.75921,"timestamp":"2016-09-02 12:38:53"

}

If your developer will take the data in this form will be able to place them on the site.
 
johntaylor1: I have a developer but he asked "Does MT4 provide an API for the data?"

I second the suggestion by Mikhail Dovbakh to output the data to your site via WebRequest(). You just have to ask your Web Developer to setup a Web Service/API on the web side with some security to prevent hacking.

However, also remember that MetaTrader has a FTP Publish function for automatically publishing reports on the account state and its history as well. The reports can also be tailored to your requirements by setting up a template for it.

Reason: