I need a program to automatically keep track of performance details made by metatrader 4 and upload this data into a mysql database.
The program will need to calculate all of the following statistics:
Total Trades Placed
Percent of Trades resulting in profit
Percent of Trades resulting in Loss
Number of trades resulting in profit
Number of trades resulting in loss
Longest consecutive run of winning trades
Longest consecutive run of losing trades
Average Monthly trades placed
Total Profit in Pips
Average Monthly Gain in Pips
Average Win amount in pips
Average loss amount in pips
Highest win in pips
largest loss in pips
Average risk in pips
Highest risk in pips
Highest draw down in pips
Total profit in ROI%
Average monthly gain in percent to balance
Average Win gain to balance in percent of balance
average loss to balance in percent of balance
Highest win in percent of balance
largest loss in percent of balance
Average risk in percent of balance
Highest risk in percent of balance
Highest draw down in percent of balance
Performance at the end of each month in percent gain or loss to balance.
Performance at the end of each month in gain or loss of pips.
The program will need to be capable of running with multiple instances of MT4. I plan on using this for multiple strategies at all times. Each instance of MT4 will be its own strategy, and will need to record their own performance details.
The program will need to only upload statistics based on closed trades.