Errors, bugs, questions - page 1287

 
paladin800:
GMT.
TimeGMT();
 
artmedia70:
TimeGMT();
Yes, I stumbled upon this function too. I can't figure out how to make one variable in external parameters as 4AM and the other as 5PM and then just compare TimeGMT() result with them.
 
papaklass:

Why does my profile show 4 published codes in CodeBase?

But if I go to CodeBase through the menu and select "My Codes", I have 7 published codes:

What's the trick?

The calculation is really different. The user achievements do not take into account the publications imported from mql4.com, you have 3 of them.

Only publications originally published on mql5.com are counted - you have 4 of these = three for MT5 + one for MT4.

 

I think everyone has noticed that you don't have to be case-sensitive to log in to your account here. When I'm writing here now, you can see my login is written in small letters and numbers. If I'm logging in with all capital letters or capital-small letters, I'll still be logged in. Ok, it's not directing me in any way.

In his ME5 created a project, which should connect another party and the discomfort is that when the window to add a user to write a login companion, the message appears that there is no such. I asked in ServiceDesk, they said that I must respect the case of letters. Ie here at logging is not important, but when adding to ME5 project is important. If the case does not matter here, then make it so that in projects it does not matter either.
 
zhserg:

Can you tell me what's wrong, at least approximately. Could it be because of WinXP?

Checked in WinXP - your code works.

Does your object appear in the list of objects on the chart?

 
I am publishing my application to the desk service here to speed up its processing. (It's been a week now and no response.)Opened,Started: 2015.03.03 10:49,#1169959

Terminal version and bit rate

MetaTrader 5, build 1085

Problem description

Degree dependence of the time of searching orders or deals on their number. It is clear that the runtime of the functions HistoryOrderGetDouble, HistoryOrderGetInteger, HistoryDealGetInteger, HistoryDealGetDouble called for each order in the history should linearly increase with the growing number of orders processed by them:

total execution time = query execution time per order * number of orders;

In reality this is not the case. Instead, there was a revealed power dependence of acount of milliseconds =0.000005*n^2 wheren is the number of orders to be processed.

Sequence of actions

This script shows the existing problem:

//+------------------------------------------------------------------+
//|                                             TestSpeedHistory.mq5 |
//|                                 Copyright 2015, Vasiliy Sokolov. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#property  copyright "Copyright 2015, Vasiliy Sokolov."
#property  link      "http://www.mql5.com"
#property  version   "1.00"
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
{
//---
   HistorySelect(0, TimeCurrent()+100);
   for(int end_order_index = 1000; end_order_index < HistoryOrdersTotal(); end_order_index+=1000)
   {
      uint tiks_begin = GetTickCount();
      TestProgression(end_order_index);
      uint tiks = GetTickCount() - tiks_begin;
      printf("Parsing " + (string)end_order_index + " for " + (string)tiks + " msc.");   
   }
}

void TestProgression(int end_order_index)
{
   for(int i = 0; i < end_order_index; i++)
   {
      ulong id = HistoryOrderGetTicket(i);
      string symbol = HistoryOrderGetString(id, ORDER_SYMBOL);
      double priceSetup = HistoryOrderGetDouble(id, ORDER_PRICE_OPEN);
      double volumeSetup = HistoryOrderGetDouble(id, ORDER_VOLUME_INITIAL);
      long tSetup = HistoryOrderGetInteger(id, ORDER_TIME_SETUP_MSC);
      string comment = HistoryOrderGetString(id, ORDER_COMMENT);
      ENUM_ORDER_TYPE type = (ENUM_ORDER_TYPE)HistoryOrderGetInteger(id, ORDER_TYPE);
      ENUM_ORDER_STATE state = (ENUM_ORDER_STATE)HistoryOrderGetInteger(id, ORDER_STATE);
      ulong magic = HistoryOrderGetInteger(id, ORDER_MAGIC);
      HistoryDealGetInteger
   }
}
//+------------------------------------------------------------------+

The result obtained

It seems obvious that the runtime for this script should increase linearly with increasing end_order_index. Thus, if processing of 1000 orders in TestRegression takes 16 ms, processing of 2 000 orders should take 16 * 2 = 32 ms. But this is not the case. Instead, the dependency is a stepped dependency. The script shows the following message:

2015.03.03 12:14:29.385 TestSpeedHistory (USDCHF,D1)    Parsing 22000 for 4025 msc.
2015.03.03 12:14:25.354 TestSpeedHistory (USDCHF,D1)    Parsing 21000 for 3666 msc.
2015.03.03 12:14:21.689 TestSpeedHistory (USDCHF,D1)    Parsing 20000 for 3323 msc.
2015.03.03 12:14:18.358 TestSpeedHistory (USDCHF,D1)    Parsing 19000 for 2995 msc.
2015.03.03 12:14:15.365 TestSpeedHistory (USDCHF,D1)    Parsing 18000 for 2715 msc.
2015.03.03 12:14:12.658 TestSpeedHistory (USDCHF,D1)    Parsing 17000 for 2418 msc.
2015.03.03 12:14:10.243 TestSpeedHistory (USDCHF,D1)    Parsing 16000 for 2106 msc.
2015.03.03 12:14:08.134 TestSpeedHistory (USDCHF,D1)    Parsing 15000 for 1872 msc.
2015.03.03 12:14:06.266 TestSpeedHistory (USDCHF,D1)    Parsing 14000 for 1622 msc.
2015.03.03 12:14:04.645 TestSpeedHistory (USDCHF,D1)    Parsing 13000 for 1388 msc.
2015.03.03 12:14:03.244 TestSpeedHistory (USDCHF,D1)    Parsing 12000 for 1170 msc.
2015.03.03 12:14:02.074 TestSpeedHistory (USDCHF,D1)    Parsing 11000 for 983 msc.
2015.03.03 12:14:01.097 TestSpeedHistory (USDCHF,D1)    Parsing 10000 for 796 msc.
2015.03.03 12:14:00.295 TestSpeedHistory (USDCHF,D1)    Parsing 9000 for 639 msc.
2015.03.03 12:13:59.657 TestSpeedHistory (USDCHF,D1)    Parsing 8000 for 500 msc.
2015.03.03 12:13:59.164 TestSpeedHistory (USDCHF,D1)    Parsing 7000 for 358 msc.
2015.03.03 12:13:58.796 TestSpeedHistory (USDCHF,D1)    Parsing 6000 for 266 msc.
2015.03.03 12:13:58.537 TestSpeedHistory (USDCHF,D1)    Parsing 5000 for 171 msc.
2015.03.03 12:13:58.369 TestSpeedHistory (USDCHF,D1)    Parsing 4000 for 94 msc.
2015.03.03 12:13:58.277 TestSpeedHistory (USDCHF,D1)    Parsing 3000 for 47 msc.
2015.03.03 12:13:58.229 TestSpeedHistory (USDCHF,D1)    Parsing 2000 for 15 msc.
2015.03.03 12:13:58.208 TestSpeedHistory (USDCHF,D1)    Parsing 1000 for 16 msc.


Function for dependence of processing time on the number of orders:

Expected result

This operation is expected to takeO(n) time, while it takesO(n^2).

Further details

To make sure that the script works correctly, you should run it on an account having a great amount of deals and orders.

The attached chart as a function of time vs. the number of orders is attached. It clearly illustrates the graduated dependence of the function operation on the amount of orders

Important: According to my observations, this unpleasant dependence appeared in MetaTrader 5 around the beginning of summer 2014. Before that time everything was working fast.

 
Good day ! I hope I'm posting my question in the right section. I tried to test MT5 under Wine and it doesn't work. When I start Wine it shows an error, even though the application is working. It is also not clear where to store the certificates. I tried to install it or simply copy the application, the error is the same. I even disabled the sounds just in case, does not help. Maybe somewhere to download a stable unambiguously working under Linux, the version?
 
polik:
Good day ! I hope I placed my question in the correct section. I tried to use MT5 under Wine and it does not work. Wine shows an error during Wine startup, though the application is working. It is also not clear where to store the certificates. I tried to install it or simply copy the application, the error is the same. I even disabled the sounds just in case, does not help. I have no idea where I can download a stable version that unambiguously works under Linux.

Afternoon,

What is the error? What system is it? Wine version?

 
C-4:
I publish my request in desk service here to speed up its processing. (It's been a week now, no response.)Opened,Started: 2015.03.03 10:49,#1169959

Terminal version and bit rate

MetaTrader 5, build 1085

Problem description

Degree of dependence of the time of searching orders or deals on their number. It is clear that the runtime of the functions HistoryOrderGetDouble, HistoryOrderGetInteger, HistoryDealGetInteger, HistoryDealGetDouble called for each order in the history should linearly increase with the growing number of orders processed by them:

total execution time = query execution time per order * number of orders;

In reality this is not the case. Instead, a power-dependence was detected wheremilliseconds =0.000005*n^2 wheren is the number of orders to be processed.

Similar pattern happens when calculating a large number of indicators. It all started abruptly with version 1079.
I have 8 TFs open at the same time, with 10 indicators on each. It is impossible to work.

 

Who has this in real life.....

htimes are constantly hovering mt4