Errors, bugs, questions - page 2138

 

I think there's a problem with the history upload.

Yesterday I waited for about 30 minutes, then I changed my account and today I decided to double-check:


  1. I open a ruble account RUR
  2. in the tester I am running a test on EURUSD
  3. terminal is trying to load EURRUR quotes
  4. No quotes, the tester froze



I struggled somehow, then decided to download the history, which does not exist

2018.02.21 15:58:48.244 Tester  EURRUR: history data begins from 2018.02.21 00:00
2018.02.21 15:58:48.344 Tester  USDRUR: preliminary downloading of M1 history started
2018.02.21 15:58:49.244 Tester  USDRUR: 20% history downloaded
2018.02.21 15:58:49.544 Tester  USDRUR: 30% history downloaded
2018.02.21 15:58:49.844 Tester  USDRUR: 40% history downloaded
2018.02.21 15:58:50.144 Tester  USDRUR: 51% history downloaded
2018.02.21 15:58:50.444 Tester  USDRUR: 61% history downloaded
2018.02.21 15:58:50.657 Tester  USDRUR: 71% history downloaded
2018.02.21 15:58:51.057 Tester  USDRUR: 81% history downloaded
2018.02.21 15:58:51.357 Tester  USDRUR: 91% history downloaded
2018.02.21 15:58:51.657 Tester  USDRUR: preliminary downloading of M1 history completed in 0:03.417
2018.02.21 15:58:51.657 Tester  USDRUR: history data begins from 2016.12.26 00:00
2018.02.21 15:58:51.661 Core 1  agent process started
2018.02.21 15:58:52.095 Core 1  connecting to 127.0.0.1:3000
2018.02.21 15:58:52.095 Core 1  connected
2018.02.21 15:58:52.103 Core 1  authorized (agent build 1755)
2018.02.21 15:58:52.105 Tester  EURUSD,H1 (Alpari-MT5-Demo): testing of Experts\Exp - TickSniper PRO FULL v36 20180220.ex5 from 2018.01.01 00:00 to 2018.02.10 00:00
2018.02.21 15:58:52.891 Core 1  common synchronization completed
2018.02.21 15:58:53.064 Tester  quality of analyzed history is 100%
2018.02.21 15:58:54.393 Core 1  EURRUR: history synchronization started



It's OK on USDJPY

 

It's a silly situation with custom character bars. I can write to history (CustomRatesReplace) as many bars as I want, but I can't read them (CopyRates) here (TERMINAL_MAXBARS).

We have to solve this wrong situation somehow. Perfectly see the beginning of local History through

SeriesInfoInteger(_Symbol, PERIOD_M1, SERIES_SERVER_FIRSTDATE);

But to get to it.

Maybe to give a possibility to change TERMINAL_MAXBARS via MQL? Or make CopyRates overload without MaxBars limit?

 

Noted this behaviour of MT5 for a long time, but now decided to write.

I am working in ME and MT5+tester. Sometimes I can't connect to Agent and need to restart Terminal. I got used to this bug, so it's not about it.

So, I close Terminal and press F4 in ME to open Terminal. And this is where some nonsense begins.

ME goes into a "Not responding" state several times. The terminal does not start. After a few seconds I press F4 again - reaction is the same as before.

As a result, in 20 seconds (minimum) on not weak machine (plenty of memory, SSD, 95% CPU free) Terminal is launched.

If you compare it with MT4 - it's heaven and earth. MT4 is almost instantly launched by F4 from ME. MT5 - it launches like some super raw application.

 
fxsaber:

It's a silly situation with custom character bars. I can write to history (CustomRatesReplace) as many bars as I want, but I can't read them (CopyRates) here (TERMINAL_MAXBARS).

We have to solve this wrong situation somehow. Perfectly see the beginning of local History through

But to get to it.

Maybe it would be possible to change TERMINAL_MAXBARS via MQL? Or make CopyRates overload without MaxBars limit?

SD thinks there's no problem when you can't get the quote history further than MaxBars. This example (one of many scenarios where the required history, which already IS on the local machine)

The assumption is that the limit is set to save resources. And rightly so!

Let's imagine a Market Product, which is designed to calculate equiti-line stats.

It turns out that the user, before applying this product, will have to do UnlimitBars. And after applying it - to return it back.

not impressed. The crutch stays alive!

 

Indicators do not always return ACCOUNT_LOGIN when starting the terminal

0 11:00:01.880 Custom indicator tester EURUSD,H1: loaded successfully
0 11:00:01.887 tester EURUSD,H1: OnInit 0 < ---- AccountInfoInteger(ACCOUNT_LOGIN) returned 0
0 11:00:01.887 tester EURUSD,H1: initialized
0 11:00:01.887 tester EURUSD,H1: OnCalculate 0 < ---- AccountInfoInteger(ACCOUNT_LOGIN) returned 0
0 11:00:05.980 tester EURUSD,H1: OnCalculate 0 < ---- AccountInfoInteger(ACCOUNT_LOGIN) returned 0
0 11:00:06.654 tester EURUSD,H1: OnCalculate 0 < ---- AccountInfoInteger(ACCOUNT_LOGIN) returned 0
0 11:00:07.030 tester EURUSD,H1: OnCalculate 442394 < ---- AccountInfoInteger(ACCOUNT_LOGIN) returned account number
0 11:00:07.040 tester EURUSD,H1: OnCalculate 442394 < ---- AccountInfoInteger(ACCOUNT_LOGIN) returned account number

Source code

//+------------------------------------------------------------------+
//|                                                       tester.mq4 |
//|                        Copyright 2017, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2017, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
   string text=IntegerToString(AccountInfoInteger(ACCOUNT_LOGIN));
   Print("OnInit "+text);

   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   string text=IntegerToString(AccountInfoInteger(ACCOUNT_LOGIN));
   Print("OnCalculate "+text);
   return(rates_total);
  }
//+------------------------------------------------------------------+

I may be wrong but in my opinion no program can work if account number is not known.....

 
Vladimir Pastushak:

I may be wrong, but in my opinion no program can work if the account number is not known.....

I never useaccount number in EAs and indicators, except for Report-dealing.

But I agree that even offline the account number (the last connection before the terminal was switched off) should always be available.

 
fxsaber:

I never usethe account number in EAs and indicators, except for Report-doors.

But I agree that even offline the account number (last connection before the terminal was switched off) should always be available.

Online as well. You always need to know and understand under which account what happened and at what point.

How can you run a program if you do not know for which account something is done.

This is not "sharash montash", people may have millions in their accounts here....

 
Vladimir Pastushak:

Online as well. You always need to know and understand under which account what happened and at what point.

How can you execute a program if you don't know which account something is being done for.

This is not "sharash montash", people may have millions in their accounts here....

99% of EAs do not analyse account numbers.

 
fxsaber:

99% of advisors do not analyse the account number

because 99.99% of EAs are "sharash montash" ....

I am sure that every quality EA should keep its own operation log, either during operation or when unloading the EA the user should get the operation log on demand. In case of critical errors, it is obligatory!

By critical error I mean disconnection, requotes, slow code.

 
Vladimir Pastushak:

because 99.99% of EAs are "sharash montash" ....

I write exactly those kinds of advisors.