Errors, bugs, questions - page 2956

 
Boris:

Corrected by

GetTickCount is of type uint
Документация по MQL5: Общие функции / GetTickCount
Документация по MQL5: Общие функции / GetTickCount
  • www.mql5.com
GetTickCount - Общие функции - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Vladimir Karputov:
GetTickCount is of type uint
#property copyright "Copyright 2021, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"



ushort a;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
a=0;
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
  a++;
  Comment("a: ",a,"/n");
}
This doesn't work either. Maybe there's an error in the debugger? If a is assigned a different type, everything is ok.
 
Boris:
It doesn't work that way either. Maybe an error in the debugger? If a is assigned a different type, everything is ok.

Post the examples, with detailed description and result in the branch New MetaTrader 5 build 2755: Improvements in Quotes window and debugger. Do not forget to specify the computer, operating system and terminal parameter (first three lines from the "Journal" tab after restarting the terminal).

Новая версия платформы MetaTrader 5 build 2755: Улучшения в окне котировок и отладчике
Новая версия платформы MetaTrader 5 build 2755: Улучшения в окне котировок и отладчике
  • 2021.01.13
  • www.mql5.com
В пятницу 15 января 2021 года будет выпущена обновленная версия платформы MetaTrader 5...
 

Need a method for quickly duplicating Terminal settings.


Copying the following data

Terminal\MQL5\*.*
Terminal\config\*.*
Terminal\*.exe


All works fine, but Navigator->Favourites list is empty. Can you tell me what else I should copy to make it complete?

 
In MetaTrader 4 Version: 4.00 buld 1320 from 11 DEC 2020 in the properties -the zoom is not fixed when switching timeframes or reloading the terminal.
 
fxsaber:

Everything works fine, but the Navigator->Favourites list is empty. Can you tell me what else I should copy to make it complete?

I think it's right here.

\bases\favourites.dat
 
Dzmitry Manannikov:

I think it's right here.

Thank you. Strange choice of folder.

 
Comments not related to this topic have been moved to "Questions from MQL4 MT4 MetaTrader 4 beginners".
 

I will repeat the problem with error 4401.

The problem occurs when the requested quantity is less than TERMINAL_MAXBARS but more than the actual quantity available.

The attached indicator shows this clearly. At OnCalculate we request successively increasing amount of rates, everything works quickly, in one call to OnCalculat, until we request the amount that exceeds the real amount. Then real amount is returned, but all other calls to CopyRates end with err 4401. From the next OnCalculate it works again until the requested quantity exceeds the available quantity.

Again, requested quantity is less than TERMINAL_MAXBARS.

Документация по MQL5: Доступ к таймсериям и индикаторам / CopyRates
Документация по MQL5: Доступ к таймсериям и индикаторам / CopyRates
  • www.mql5.com
CopyRates - Доступ к таймсериям и индикаторам - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
Files:
 

You can quickly re-initialise the EA as follows.

On the chart ENTER->a->ENTER.