Download MetaTrader 5

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

2008.06.05 06:51

Report - script for MetaTrader 4

| English Русский 中文 Español Deutsch 日本語 Português

votes: 8
Report.mq4 (19.73 KB)view
report.png (85.21 KB)

Report generator:

  • allows you to select data from history by a preset criterion;
  • allows you to sort the displayed data by any field or by a group of fields;
  • allows you to show/hide specific columns;
  • additionally displays statistics on the selected orders and other parameters.

The script can be launched in any window. The final file is created in the \experts\files directory under the name of AccountName_rep.htm. The area to be modified is marked with the following comments in the script code:
// This may and must be modified
// End of the area allowed to be modified

For sorting, we use arrays SortBy and SortBy2. To sort orders by open time, you should write in the script body:

int SortBy[] = {BY_OPENTIME};

To sort orders by symbol and then by chart, you should write:

int SortBy[] = {BY_SYMBOL, BY_PROFIT};

The other array, SortBy2, is responsible for sorting direction (ASC, DESC). By default, ASC is used.

The next version will sort orders first by symbol in the ascending direction and then by open time in the descending direction.

int SortBy[] = {BY_SYMBOL, BY_OPENTIME};
int SortBy2[] = {ASC, DESC};

The method of Validate allows you to set a criterion to select data in history:

  • return all orders:return (true);
  • return only orders with positive profit:return (OrderProfit() > 0);
  • return all orders for GBPUSD:return (OrderSymbol() == "GBPUSD");

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

TP-SL_Removing TP-SL_Removing

Immediately deletes the SL/TP of all positions.

Closed_TOTAL Closed_TOTAL

Total closure of all positions (winners/losers). You can also select which are of a single instrument.