Introduction
I have created this post to explain my simple software (an EA written in MQL4 and a simple PHP script) that takes your trading activity (trades open and closed) and moves it to a MySQL database table on your website.
This utility has many advantages. Once saved in a database table, you can then manipulate the data or use it in any way you want. Traditional statement publishing service provided by standard MT4 platform is not very useful when it comes to analyzing the trading history data. You either need a sophisticated statement parsing mechanism (which can be a cumbersome software in itself) or you need some other way to slicing and dicing the history data.
This package consists of an EA and a PHP script will come in handy if you want some way of moving your trading history data to a MySQL database.
I have also created a simple frontend to show your forex trading account activity in a more precise, convenient and meaningful way instead of showing the same old clumsy MT4 statement. You can see the live demo here. This is one of my test accounts created on FXCM where I am running my own free robots for quite some time now. I am running this MT4 24/7 on my own home PC. (If you are interested to know how to run auto-trading on your own home laptop or PC, you are welcome to see my post on the same topic here – How to setup forex auto trading on your home PC or laptop for free? Step-by-step instructions.)
Installation Guide
- Unpack the contents of the ZIP file on your computer and then upload the PHP files on your website in any folder you choose but make sure all the PHP files are in the same folder.
- Most important step is to update the allowed URLs list in the settings section of your MetaTrader MT4. See the screenshot below how to do this: (make sure you put your site URL here – for example if you plan to upload the webrequest.php in a folder /fxupdate on your site – your-site.com then you should update the URL http://your-site.com/fxupdate/webrequest.php in this list.)
- Copy the EX4 file in the Experts folder of your MT4 platform folder.
- Open your MT4 platform and add the EX4 file on any of the charts. You can open a new chart and add this EA.
- Make sure you enter the username and seconds parameters as shown in the screenshot below. Also enter the URL of the webrequest.php file that you have updated in the step above. Username can be any unique name you wish to use. This parameter helps you collect multiple accounts data under one username. Second parameter is the number of seconds between two updates sent to your site.