Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

Scripts

Export Deals History - script for MetaTrader 5

amrali

Views:
649
Rating:
votes: 8
Published:
2019.02.12 06:44
Updated:
2019.04.06 22:01
\MQL5\Scripts\
dummy.mq5 (0.67 KB)view

The script exports history of deals from MT5 retail hedging account selected between two dates. The resulting file is CSV that can be opened/imported with any spreadsheet software.

It supports only retail hedging accounts (Forex).

To export the entire trading history, keep Start date and End date at their default values.


The CSV can be found in the folder \MQL5\Files

Following data columns are exported:

  • Open Time
  • Position ID
  • Symbol
  • Type
  • Volume
  • Open Price
  • S/L
  • T/P
  • Close Time
  • Close Price
  • Commission
  • Swap
  • Profit
  • Profit Points
  • Balance, this includes the running sum of all profits, swaps and commissions from previous trades
  • Magic Number
  • Duration, this includes duration of the trade expressed in (hh:mm:ss) format
  • Open Reason, this includes reason of opening the trade (client, mobile, web, expert)
  • Close Reason, this includes reason of closing the trade (client, mobile, web, expert, sl, tp, so, ...)
  • Open Comment
  • Close Comment
  • Deal In Ticket
  • Deal Out Ticket

Note that the history of deals (data rows) is ordered by Close Time to calculate the running Balance, correctly.

The CSV file can be opened with Microsoft Excel or better with Ron's CSV Editor.


Simple harmonic oscillator Simple harmonic oscillator

Simple harmonic oscillator

Simple harmonic index Simple harmonic index

Simple harmonic index

Bollinger bands extended Bollinger bands extended

Bollinger bands - extended

Bollinger bands breakout Bollinger bands breakout

Bollinger bands breakout