Simple free EA and PHP script package to move your trading history into a MySQL table on your website


Installation Guide



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 – then you should update the URL 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.





3585 Total Views 3 Views Today

Leave a Reply

Risk warning: Before deciding to participate in the Forex market, you should carefully consider your investment objectives, level of experience and risk appetite. Most importantly, do not invest money you cannot afford to lose. There is considerable exposure to risk in any off-exchange foreign exchange transaction, including, but not limited to, leverage, creditworthiness, limited regulatory protection and market volatility that may substantially affect the price, or liquidity of a currency or currency pair. More over, the leveraged nature of forex trading means that any market movement will have an equally proportional effect on your deposited funds. This may work against you as well as for you. The possibility exists that you could sustain a total loss of initial margin funds and be required to deposit additional funds to maintain your position. If you fail to meet any margin requirement, your position may be liquidated and you will be responsible for any resulting losses.