does anyone have a script for a trade analyzer in MT5?

 

I'm looking for a script that will output all my trade (i.e., "in" and "out" deals) into a spreadsheet or CSV file, in MT5.  

If it does any other type of trade analysis, that would be nice, but really I can code the analysis if anyone already has code to pull all the info into a CSV file.  

I know I can right-click save the report in the client terminal, but I was really looking for some code that would output each position (open and close) all into one row....if that makes sense.  


Thanks, 

FW 

 

You can try to find in CodeBase and with articles using search here, if not so - order the script in Freelance.

--------------

Some tools which I found:

Forum on trading, automated trading systems and testing trading strategies

How to Start with Metatrader 5

Sergey Golubev, 2014.03.07 12:57

How to Prepare MetaTrader 5 Quotes for Other Applications



Before I started studying MQL5, I tried many other applications for development of trading systems. I can't say that I wasted my time. Some of them contain a few useful tools allowing users to save time, deal with many issues, destroy some myths and quickly select some further direction for development without the knowledge of programming languages.

These applications need historical data. Due to the absence of some certain standard data format, they often had to be edited before they could be used (for example, in Excel) to comply with the format applicable to the necessary program. Even if you are able to figure out all necessary details, many things should still be done manually. Users can find different versions of scripts designed to copy the quotes from MetaTrader 4 to the necessary format. If there is such a demand, we can also develop the version of the script for MQL5.

Introduction
1. Covered Topics
2. Data Format
3. Program's External Parameters
4. Checking Parameters Entered by a User
5. Global Variables
6. Information Panel
7. Application's Main Block
8. Creating Folders and Filing the Data
Conclusion


 

Some more:

Forum on trading, automated trading systems and testing trading strategies

How to Start with Metatrader 5

Sergey Golubev, 2016.06.06 12:22

Working with Excel

Excel

Systems and tools

  1. Working with Excel (tools, indicators, conversion ...) - the thread 
  2. Forex data converters thread 
  3. MULTI FIBO CALCULATOR with DDE off course - the thread 
  4. FX risk calculator with DDE - the thread 
  5. Excel Spreadsheet to simulate cost averaging strategies objectively - the thread 

Articles

  1. MQL5 Cookbook: Writing the History of Deals to a File and Creating Balance Charts for Each Symbol in Excel - the article
  2. How to Prepare MetaTrader 5 Quotes for Other Applications - the article

CodeBase

  1. Export Indicator's Values - MT5 tool
  2. DDE - Server - MT5 tool
  3. History Dump CSV with heat map for Excel analysis - MT4 tool 
  4. MS Excel: Data Exchange and Management - MT4 tool 
  5. Export to Excel in Real Time - MT4 tool 
  6. MetaCOT 2 CFTC ToolBox (Set of Indicators) MT4 - COT in Excel 
  7. Export Trades to excel - MT4 script 
  8. Converting hst-files into csv files - MT4 tool



 
fivewhy.forex:

If it does any other type of trade analysis, that would be nice, but really I can code the analysis if anyone already has code to pull all the info into a CSV file.

https://www.mql5.com/en/code/16134

SlipPage
SlipPage
  • votes: 17
  • 2016.09.19
  • fxsaber
  • www.mql5.com
Calculation of slippages of the performed deals in account currency.
 
fivewhy.forex:

I know I can right-click save the report in the client terminal, but I was really looking for some code that would output each position (open and close) all into one row....if that makes sense. 

https://www.mql5.com/en/code/16006

An additional example is a statistical script, collected from multiple MT4 samples:

// MQL4&5-code

#include <MT4Orders.mqh> // if there is #include <Trade/Trade.mqh>, add this line AFTER that

#include <MQL4_to_MQL5.mqh> // ONLY for this example

#ifdef __MQL5__
  #property script_show_inputs

  void OnStart( void )
  {
    ::OnStartScript();  // TradingSystemRating_Script_Ad.mq4

    ::WriteDealsInfo(); // b-SharingDoW.mqh

    // Report_strict.mq4
    ::init();
    ::start();
    ::deinit();

    MessageBox("Look in MQL5\\Files");

    return;
  }
#endif // __MQL5__

#define OnStart OnStartScript

#include "TradingSystemRating_Script_Ad.mq4" // https://www.mql5.com/en/code/12040

#include <b-SharingDoW.mqh> // https://www.mql5.com/en/code/8090
sinput int MAGIC = 0;       // MagicNumber of the evaluated orders (b-SharingDoW.mqh)

// Disregard the Warnings - script has been written in 2006...
#define i ii // avoid the Warnings part
#include "Report_strict.mq4" // #property strict (MQL5), original - https://www.mql5.com/en/code/8126
MT4Orders
MT4Orders
  • votes: 35
  • 2016.10.10
  • fxsaber
  • www.mql5.com
Parallel use of the MetaTrader 4 and MetaTrader 5 order systems.
 
fivewhy.forex:

I know I can right-click save the report in the client terminal, but I was really looking for some code that would output each position (open and close) all into one row....if that makes sense.  

#include <Report.mqh> // https://www.mql5.com/ru/code/18801

void OnStart()
{
  REPORT::ToFile("Report.htm");
}
Report
Report
  • 2017.07.19
  • fxsaber
  • www.mql5.com
Библиотека для MetaTrader 4/5, которая позволяет формировать отчеты по истории торгов.