Discussion of article "The Implementation of a Multi-currency Mode in MetaTrader 5" - page 4

 
Lizar:
For this purpose, it is better to use the indicator itself by embedding the standard EventChartCustom function in it in the right place.

Is it in the indicator or in the Expert Advisor????

Sorry, I'm just getting to know MT5.

 
artall:

Is it in the indicator or in the Expert Advisor????

Sorry, I'm just getting familiar with MT5

From the indicator you send an event (signal) using EventChartCustom. And in the Expert Advisor you receive the signal and process it using OnChartEvent.

 
For some reason, I still get different results when testing multi-currency EA on different currency pairs, even using the method shown in this article.
 

Hi! If ticks on several pairs go very fast, and the processing functions themselves are longer, will the events accumulate and wait for the end of the previous processing?

A "traffic jam" will not occur, with subsequent errors?

Документация по MQL5: Математические функции / MathRand
Документация по MQL5: Математические функции / MathRand
  • www.mql5.com
Математические функции / MathRand - Документация по MQL5
 
Karlson:

Hi! If ticks on several pairs go very fast, and the processing functions themselves are longer, will the events accumulate and wait for the end of the previous processing?

A "traffic jam" will not occur, with subsequent errors?

Theoretically it is possible. Practically it works on 12 instruments on ticks without any problems. Naturally, I tried to remove everything possible from the event handler. In general, you can send not ticks or "new bar" from spies, but just signals, which will significantly unload the event handler in the Expert Advisor.
 

I also had an idea to send a new bar, but then I had the following idea that if it is not critical for the Expert Advisor to work on new bars, then it is possible to work by simply controlling a new bar on the main tf, for which the Expert Advisor is set.

Thank you.

Обработчик события "новый бар"
Обработчик события "новый бар"
  • 2010.10.04
  • Konstantin Gruzdev
  • www.mql5.com
Язык программирования MQL5 позволяет решать задачи на совершенно новом уровне. Даже те задачи, которые уже вроде имеют решения, благодаря объектно-ориентированному программированию могут подняться на качественно новый уровень. В данной статье специально взят простой пример проверки появления нового бара на графике, который был преобразован в достаточно мощный и универсальный инструмент. Какой? Читайте в статье.
 

I remember earlier it was said that OnChartEvent() is not processed in the tester. Now I checked it and found out that if the Expert Advisor is hung on a timeframe higher than the one that is accepted as an event, such an event is skipped. But if the Expert Advisor is hung on a timeframe lower or equal to the minimum one, such events are accepted.

That is, if you work on formed bars, you can set the minimum TF in the tester and the test will pass correctly even in the"Open prices only" mode. But if there is a need to process ticks, such an event will be skipped in this testing mode. Each tick event will be processed in the"OHLC on M1" and"All ticks" modes.

 
tol64:

I remember earlier it was said that OnChartEvent() is not processed in the tester. Now I checked it and found out that if the Expert Advisor is hung on a timeframe higher than the one that is accepted as an event, such an event is skipped. But if the Expert Advisor is hung on a timeframe lower or equal to the minimum one, such events are accepted.

Was it like this before or have the developers already taken a step towards processing OnChartEvent() in the tester?

P.S. The test was performed in visualisation mode.

Yes, they have already taken a step, and quite a long time ago, it was discussed half a year ago (I can't find where).
 
Urain:
Yes already took a step, and quite a long time ago, it was discussed about half a year ago (I can't find where).
Thank you. That's great. And I thought I was up to date and hadn't missed anything.))
 

tell me,

1. if I need only Bid and Ask from other currencies, is it fair to use "spies"?

2. it's just an idea, is there no possibility in the onChartEvent function to check events from other currencies and not only from the current currency?

3. is it possible to set the timer value less than one in the onTimer event, so that it would download the quotes value much more often and accordingly lag behind the time of the last tick by the minimum time?

4. or is it possible to use "CHARTEVENT_CUSTOM+n" to check, in my case, the crossing of mashes on other graphs?