Scripts: Export Positions History

 

Export Positions History:

The script exports history of closed positions to .csv file.

It supports only retail hedging accounts (Forex).

To export the entire trading history, keep Start date and End date at their default values (1970.01.01 00:00:00).

You can see that all the closed positions were reconstructed in the same way as in the History tab of the MetaTrader 5 terminal.

Author: amrali

 
You can see that all the closed positions were reconstructed in the same way as in the History tab of the MetaTrader 5 terminal.
Unfortunately, this presentation is not convenient. Since you can not see how the sequential closing of the trading position
 
fxsaber:
Unfortunately, this presentation is not convenient. Since you can not see how the sequential closing of the trading position

My script tries to stick to the same representation as in the History tab of the MetaTrader 5 terminal. If you prefer a convenient way to display the history of deals ordered by close time, you can use my other script "Export Deals History"

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

Export Deals History
Export Deals History
  • www.mql5.com
Accelerator Oscillator (AC) The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force. MACD Signals Indicator edition for new platform.
 

Added a new option to order closed positions by open time or close time. 


 

Hi guys,

After running my EA in the backtesting, I drag and drop the script into the chart but i'm only getting a csv with empty results. Only have the labels. What am I doing wrong?

The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • www.mql5.com
What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When and how are the indicator values calculated during testing, and how are the events handled? How to synchronize the bars from different instruments during testing in an "open prices only" mode? This article aims to provide answers to these and many other questions.
 
filipe197:

Hi guys,

After running my EA in the backtesting, I drag and drop the script into the chart but i'm only getting a csv with empty results. Only have the labels. What am I doing wrong?

The script should be run on live account 
 
amrali:
The script should be run on live account

Thanks for your reply. I understand that but can't I make use of this script to extract the trades information related to a backtest?

 
filipe197:

Thanks for your reply. I understand that but can't I make use of this script to extract the trades information related to a backtest?

Modify your EA and paste the script code inside  OnTester() function of your EA.

 
This code works great! I was wondering if you had a mq4 version?
Reason: