Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1006

 

Reference: https://www.mql5.com/ru/docs/runtime/running
The help states:
"If there is already an event ChartEvent in the queue of mql5 program or such an event is being handled, a new event of this type is not put in the queue".

The results of this example show that all the events created by the EventChartCustom() function are queued (and further processed by OnChartEvent() ).

void OnInit() 
   {
   Print("\n\nOnInit  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); 
   for (int i=1; i<=10; i++)
      {
      int event = 1000 + i;                 
      long GTC = GetTickCount();   
      Print("OnInit  >>>   i = ", i, "   GTC = ", GTC);
      EventChartCustom(0, event, GTC, (double)i,"");    
      Sleep(10);                   
      }
   Print("");
   return;                                         
   }
//----------------------------------------
void OnChartEvent(const int     event,  
                  const long&   lparam, 
                  const double& dparam, 
                  const string& sparam  
                  )
   {
   Print("OnChartEvent:  >>>>>>>   event = ", event, "  lparam = ", lparam, "  dparam = ", dparam );  
   }

Please clarify, are they queued or not queued?

Документация по MQL5: Программы MQL5 / Выполнение программ
Документация по MQL5: Программы MQL5 / Выполнение программ
  • www.mql5.com
Каждый скрипт и каждый эксперт работает в собственном отдельном потоке. Все индикаторы, рассчитываемые на одном символе, даже если они запущены на разных графиках, работают в одном потоке. Таким образом, все индикаторы на одном символе делят между собой ресурсы одного потока. В одном потоке с индикаторами также последовательно выполняются...
 

Please advise how to correctly specify the path to the indicator added to the resources.

Specifying:

#resource "\\Indicators\\Bollinger new.ex5"

I am trying to call it from resources:

 BolBandsNewHandle=iCustom (NULL,TF_graph,"::Indicators\\Bollinger new.ex5", ...

This way it works on my computer, but I get an error when I transfer it to another one:

test on EURUSD,H1 (netting) expert file MQL5\Indicators\Bollinger new.ex5 open error [2] program file Indicators\Bollinger new.ex5 read error loading of Bollinger new EURUSD,H1 failed [532] 2016.04.01 00:00:00 cannot load custom indicator 'Bollinger new' [4802] strategy tester report 45 total trad

Or should I specify in the indicator that it is an Expert Advisor resource?

I did it once but I forgot it )

.......................

What happened to the forum? I have never asked them to install it on the Market. And all are silent. )

 
Aleksandr Prishenko:

Please advise how to correctly specify the path to the indicator added to the resources.

Specifying:

I am trying to call it from resources:

I have it on my computer all works, but when I try to transfer it to another one, I get an error:

Or do I need to specify in the indicator that it is an Expert Advisor resource?

I did it once, but I forgot )

.......................

What happened to the forum? All who added the product to the Market know the answer to the question. And all are silent. )

Because the answer to your question is in the help, with an example. And the help is right in front of you - the website menu - documentation.

 

As the example doesn't work, I showed you how I do it.

I looked at the example several times and reread the article. I don't understand what I'm doing wrong. I remember that the path to the resource files must be specified differently, not as in the example, but as I don't remember)).
 
Aleksandr Prishenko:
and how not to remember).

And why remember all this when you always have the documentation in front of you. "You won't believe it", I can't even write iMA parameters without documentation... why should I fill up the last memory cells with information I don't need to store???

 
Alexey Viktorov:

And why remember all this when you always have the documentation in front of you. "You won't believe it", I can't even write iMA parameters without documentation... why should I fill up the last memory cells with information I don't need to store???

You have to develop your memory, there are enough cells)

 
Aleksandr Prishenko:

Please advise how to correctly specify the path to the indicator added to the resources.

Specifying:

I am trying to call it from resources:

I try to do it in this way on my computer, but I get an error when I transfer it to another one:

Or do I need to specify in the indicator that it is an Expert Advisor resource?

I did it once, but I forgot )

.......................

What happened to the forum? All who added the product to the Market know the answer to the question. And all are silent. )

When transferred to another computer or terminal, the compiled one will work without any problems. But at the moment of compilation on another computer the compiler searches for an indicator file to include it as a resource...

 
Aleksandr Prishenko:

You have to develop your memory, there are enough cells)

Nah... At the end of the sixty-fourth year, they have to be saved. :))))

 
Alexey Viktorov:

When transferred to another compiled one it will work without problems. But at the moment of compilation on another computer the compiler searches for the indicator file to include it as a resource...

On my computer everything works, but on Metacvot's computer it doesn't work(

It turns out that the indicator file is not saved to EA resources, but to some terminal resources.

 
Aleksandr Prishenko:

Everything works on my computer, but it doesn't work on Metakvot's computer(

Did you go to their office and try to run your program on their computer?

How much was the fare? I'd like to visit them too.

Reason: