Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1157

 
Juer:
Here appeared the LiveUpdate window suggesting to restart. Now if I click on terminal in task window, only this LiveUpdate window is minimized.

The problem is that you are very likely trying to run on a cheap knock-off of a real VPS. It's not even clear what the configuration is, how much space, memory, how much of those resources are free ...

Look for problems there.

Виртуальный хостинг для MetaTrader 5
Виртуальный хостинг для MetaTrader 5
  • www.mql5.com
Виртуальный хостинг для MetaTrader 4/5 является лучшим VPS-решением для Форекса. Оно не требует настройки, дает минимальные задержки до сервера и отличается низкими ценами. Всего за 10$ в месяц вы получите виртуальную платформу, которая работает круглые сутки, экономит вашу прибыль и даже окупает себя. Создать удаленную копию приложения можно...
 
Vladimir Karputov:

The problem is that you are very likely trying to run on a cheap knock-off of a real VPS. Look for problems there.

It's just a virtual machine, 800 a month. It's the same as the wind. There are no bugs in the Windows logs either.

Of course, it's easier to blame it on hardware. In terms of resource usage, however, the picture is acceptable. OK, I'll see if there's any change when the ticks come in.

 
Vitaly Muzichenko:

Any dealing that has cryptocurrency trading.

pivomoe:
Can you tell me a broker where you can open a demo account and trade at the weekend? The instruments are all welcome.

The question is still relevant. Suggest a specific broker.

 
pivomoe:

The question is still relevant. Suggest a specific broker.

Do a Google search.

 
Hi all, theCopyTicksfunctionworks only for that instro on which the Expert Advisor is loaded, if you specify a different symbol in the parameters then -1 is returned, what is this parameter for?
 
VANDER:
Hello, functionCopyTicks works only for that instro on which the EA is loaded, if you specify in the parameters of other symbol returns -1, why this parameter at all?

Have you tried reading the description?

Returned value

Number of copied ticks or -1 in case of error.

Note

The CopyTicks() function allows requesting and analyzing all incoming ticks.The first call to CopyTicks() initiates the synchronization of the ticks database stored on the hard disk for the given symbol. If the ticks are not enough in the local database, the missing ticks will be automatically loaded from the trade server. In this case, theticks from the datefrom specified in CopyTicks() to the current momentwill be synchronized. After that, all incoming ticks at this symbol will enter the tick database and keep it in the current synchronized state.

If thefrom andcountparameters aren't specified, then all available ticks will be written toticks_array[] array, but no more than 2000. Parameterflags allows to set type of required ticks.

Did you print the error? To be sure, before making a request, have you opened the folder where the ticks are stored? After receiving the error, did you observe the folder - are the ticks being downloaded?
Документация по MQL5: Константы, перечисления и структуры / Коды ошибок и предупреждений / Ошибки времени выполнения
Документация по MQL5: Константы, перечисления и структуры / Коды ошибок и предупреждений / Ошибки времени выполнения
  • www.mql5.com
Некорректное имя пользовательского символа. В имени символа можно использовать только латинские буквы без знаков препинания, пробелов и спецсимволов (допускаются ".", "_", "&" и "#"). Не рекомендуется использовать символы , :, ", /,\, |, ?, *. Слишком...
 

So - all ticks are deleted: folder is empty

Folder empty

I start the script on USDJPY, but I request ticks from AUDCAD (I request 2000000 ticks).

//+------------------------------------------------------------------+
//|                                                    CopyTicks.mq5 |
//|                        Copyright 2015, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.01"
//--- покажем окно входных параметров при запуске скрипта
#property script_show_inputs
input string name="AUDCAD";  // символ по которому запрашиваем тики
input int  ticks=2000000;  // количество запрашиваемых тиков
//---
MqlTick ExTicks[];
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- запросим тики
   int copied=CopyTicks(name,ExTicks,COPY_TICKS_ALL,0,ticks);
//--- если тики получены, то выведем на график значения Bid и Ask  
   Print("Получено тиков: ",copied," код ошибки: ",GetLastError());
   if(copied>1)
     {
      Print("Тик: ",ExTicks[0].time," bid: ",ExTicks[0].bid," ask: ",ExTicks[0].ask," last: ",ExTicks[0].last," [0]");
      Print("Тик: ",ExTicks[copied-1].time," bid: ",ExTicks[copied-1].bid," ask: ",ExTicks[copied-1].ask," last: ",ExTicks[copied-1].last," [",copied-1,"]");
     }
   Print("Size ",((long)copied*sizeof(MqlTick))>>20, " Mb");
  }
//+------------------------------------------------------------------+

Pay attention - it took (Log tab) three seconds to download

2019.12.08 08:16:51.322 Scripts script CopyTicks_1_01 (USDJPY,Daily) loaded successfully
2019.12.08 08:16:54.933 Scripts script CopyTicks_1_01 (USDJPY,Daily) removed

Result of execution (Experts tab)

2019.12.08 08:16:54.914 CopyTicks_1_01 (USDJPY,D1)      Получено тиков: 2000000 код ошибки: 0
2019.12.08 08:16:54.918 CopyTicks_1_01 (USDJPY,D1)      Тик: 2019.09.19 16:24:17 bid: 0.9023600000000001 ask: 0.90258 last: 0.0 [0]
2019.12.08 08:16:54.918 CopyTicks_1_01 (USDJPY,D1)      Тик: 2019.12.06 23:54:53 bid: 0.9064700000000001 ask: 0.90724 last: 0.0 [1999999]
2019.12.08 08:16:54.918 CopyTicks_1_01 (USDJPY,D1)      Size 114 Mb
 
Thank you, something has cleared up. The problem occurs only in the strategy tester, at first there was error4302 -Symbol not selected in MarketWatch, added SymbolSelectfunction. Now there is4401 -Requested history not found. I cannot find the folder with ticks, I don't have such a directory as on your screenshot, may be it needs to be created or specified somewhere in the settings?
 
VANDER:
Thank you, something has cleared up. The problem occurs only in the strategy tester, at first there was error4302 -Symbol not selected in MarketWatch, added SymbolSelectfunction. Now it's4401 -Requested history not found. I cannot find the folder with ticks, I don't have such a directory as on your screenshot, may be it needs to be created or specified somewhere in the settings?

Club Telepaths. They are able to read minds, penetrate remotely into the computer and determine: the type and build of the terminal, name and complexity of the operating system, the type of program that runs (indicator, expert, script) and most importantly - they can SEE THE CODE AT A DISTANCE!

Клуб Телепатов
Клуб Телепатов
  • 2011.05.08
  • www.mql5.com
Клуб телепатов Вас послали сюда? Тогда давайте знакомиться! Как же такое могло случиться со мной...
 

Terminal Discovery v.5 build 2265

Vinda 8.1 x64

Expert

MqlTick           Tick[];
//+------------------------------------------------------------------+
void OnInit()
  {
   int A=0;
   if(SymbolSelect("SBRF-12.19",true))
      if((A=CopyTicks("SBRF-12.19",Tick,0,0,0))==-1)
         Alert(GetLastError());
      else
         Alert(A);
  }

UPD: found the ticks folder, cleaned it up, after running the expert only the ticks of the current instrument are added.

Reason: