Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Scripts

Report - script for MetaTrader 4

Views:
12854
Rating:
(23)
Published:
2008.06.05 06:51
Updated:
2014.04.21 14:52
Report.mq4 (19.73 KB) view
report.png (85.21 KB)
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance


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");


CustomCandle CustomCandle

CustomCandle draws candlesticks of a larger and, perhaps, non-standard (for MT 4) timeframe in the current chart.

MarketProfile MarketProfile

Market Profile is a tool used by many Futures traders.

Interception Interception

Script interception of pressing keys or mouse buttons in the windows of MetaTrader 4. It can be helpful in writing controls.

StepByStep StepByStep

A step-by-step passing of historical data for manual testing of trading.