Libraries: MT4Orders QuickReport - page 3

 
Forester #:

What browser? How many transactions? I have 100,000 and it takes about 10 seconds to think, but it shows.

Chrome. 40K lines. From the second click sometimes the chart appears. Turnover-graphics formation loads CPU the most.

 
Варианты улучшения:
  • You can try to upload the report to a binary file and read it in the browser, perhaps it can work with a large number of lines. But then we will have to manually select the binary file due to security restrictions. That is, we will not be able to automatically open the report immediately after the test.
Here it is done through a file. There are no problems with automatic opening.

.
  • I think you can not only upload trades via MT4Orders, but also from a regular MQL5 code.

It will be difficult.

MQL5 Ордера истории - Извлечь цену открытия и закрытия каждой транзакции в истории сделок
MQL5 Ордера истории - Извлечь цену открытия и закрытия каждой транзакции в истории сделок
  • 2023.11.20
  • www.mql5.com
Каждая позиция имеет уникальный идентификатор, который присваивается всем сделкам. Идентификатор позиции - это уникальное число, которое присваивается каждой вновь открытой позиции и не изменяется в течение всей ее жизни. Идентификатор позиции указывается в каждом ордере , которая ее открыла
 
fxsaber #:

Chrome. 40K lines. From the second click sometimes the chart appears. Turnover-graphics formation loads CPU the most.

Try Mozilla. It shows and increases up to 100 000. I tried 700 000 - it shows, but it can't zoom any more, it consumes all memory.

.
fxsaber #:
Here it is done through a file. There are no problems with automatic opening.

It will take a couple of days. I will postpone it if 5 million is not enough. Not relevant for now.

fxsaber #:
It's gonna be tough.

Also in the drawer. Add a line

#include <MT4Orders.mqh>
easier)
 
Forester #:

if 5 million isn't enough.

Why work with html-statements like this?

 
By the way, the library is 90% cross-platform - it works on MT4 and MT5. There is a little bit of work to make it run on MT4 as well.
 
This library doesn't need to be changed to get html-statement of locked accounts of Signals service.
 
fxsaber #:
By the way, the library is 90% cross-platform - it works on MT4 and MT5. There is a little work to make it work on MT4.
If someone finalises it, I will update the code to make it available for everyone.

.
fxsaber #:
Here it is done through a file. There are no problems with automatic opening.

You create a JavaScript text file, which is called from the HTML page (by the way, you can not save it to a separate file, but add it to the page code, as in my version).
I described a variant of saving data not to a text file, but to a binary file. It cannot be automatically loaded as a JavaScript file, because it is not JS code, you will have to select this file on the disc to start reading it. Perhaps then it will be possible to read more than 5.6 million lines.

fxsaber #:

Why work with html stats like this?

For now, there is no need to. But if the need arises, there is a plan on how to do it.

fxsaber #:

Didn't realise. Unfortunately, very slow this google.charts and inconvenient when compared to highcharts.

I changed it to highchart. It turned out to be better: google.charts froze at 700,000 deals, while highchart displayed them without special brakes and was able to zoom in to individual deals.

You can choose Ordinal - uniform step (as in MetaQuotes tester reports), or Logarithmic - logarithmic scale (it can be useful if you have exponential balance growth). After changing these items, you need to click again on the desired chart to apply the selected option.
 
Forester #:
If someone finalises it - I'll update the code to be available to everyone.
#ifndef __MQL5__

#property strict

long OrderOpenTimeMsc( void ) { return(OrderOpenTime() * 1000); }
long OrderCloseTimeMsc( void ) { return(OrderCloseTime() * 1000); }

double OrderOpenPriceRequest( void ) {return(OrderOpenPrice()); }
double OrderClosePriceRequest( void ) {return(OrderClosePrice()); }

enum ENUM_ACCOUNT_MARGIN_MODE
{
  ACCOUNT_MARGIN_MODE_RETAIL_NETTING,
  ACCOUNT_MARGIN_MODE_EXCHANGE,
  ACCOUNT_MARGIN_MODE_RETAIL_HEDGING  
};

#define SYMBOL_CUSTOM (-1)

#define ACCOUNT_MARGIN_MODE (-1)
#define ACCOUNT_CURRENCY_DIGITS (-2)

long AccountInfoInteger2( const int Property )
{
  switch (Property)
  {
    case ACCOUNT_MARGIN_MODE:
      return(ACCOUNT_MARGIN_MODE_RETAIL_HEDGING);
    case ACCOUNT_CURRENCY_DIGITS:
      return(2);      
  }
  
  return(AccountInfoInteger(Property));
}

#define AccountInfoInteger AccountInfoInteger2

// string BASEPATH_ = (::TerminalInfoString(TERMINAL_DATA_PATH) + "\\MQL4\\Files\\\\");

#endif // #ifndef __MQL5__

#define  REPORT_BROWSER            // Open report in browswer automatically. Require DLL.
#include <MT4Orders_QuickReport.mqh> // https://www.mql5.com/ru/code/47816

void OnStart()
{  
  QuickReport("QuickReport", true);
}
 
Forester #:

I changed to highchart. It turned out to be better: google.charts froze at 700,000 deals, while highchart displayed them without special brakes and was able to zoom in to individual deals.

It's cool!

You can choose Ordinal - uniform step (as in MetaQuotes tester reports), or Logarithmic - logarithmic scale (it can be useful if you have exponential balance growth). After changing these items, you need to click again on the desired chart to apply the selected option.

Useful.


The chronology seems to be broken.

 
fxsaber #:
Thanks for the code. Added it to \MT4Orders_QuickReport.mqh
.
fxsaber #:
The chronology seems to be broken.


Only the MQ tester report had this. The virtual one did not have it.
I put all operations, including limit operations, into the array for charting. They do not change the balance, so they did not interfere much.

It turned out that the MQ tester transfers the deleted limit orders to the archive with a delay:

Order

99 1005 2023.05.29 00:03:59.281 2023.05.29 00:03:59.331

got into the story 2 ticks later. Should have been after 00:03:59.331, tick 00:03:59.380 missed, moved to history at 00:03:59.430 tick.
Order

123 1005 2023.05.29 00:03:59.331 2023.05.29 00:03:59.380
got into the archive 1 tick later. There are more examples in the screenshot above.
.


Closing time is correct, but apparently they have limit ones in a separate array and transfer to history is not processed on every tick.

In your virtual tester, everything is clear: (the array is shared and is sent to history on its own tick)

I have removed the output of limits on charts, now these bars with wrong time are not there.