Multicurrency - multitime advisor

 

Hi! I can't find such an EA template anywhere. I only found a multi-currency one, here is a link to the description https://www.mql5.com/ru/articles/648

I am trying to add multitasking on the basis of this article, but it is not very good, so please help me to find an example of such an EA, maybe someone saw it on the Internet)

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

there's a wrong data reception, the loop has to be removed, when a tick comes, all pairs in the loop go through...

this robot is quite and multitimed

 
Fast528:

there's a wrong data reception, the loop has to be removed, when a tick comes, all pairs in the loop go through...

this robot is quite and multitimed.

Which cycle - can you show me?

 
Tango_X:

Which loop - can you show me?

Look, the onchartivent receives ticks from each symbol, but in this robot, every tick on a symbol additionally runs a loop on all these pairs, this loop needs to be removed

 

This is the best solution at the moment: https://www.mql5.com/ru/forum/225832/page2#comment_6406538

Forum on trading, automated trading systems and strategy testing

Analysis of test results and optimization in MetaTrader 5 strategy tester

fxsaber, 2018.01.28 16:22

Significantly accelerated
#include <TesterBenchmark.mqh> // https://www.mql5.com/ru/code/18804

input int AmountSymbols = 1;

const string Symbols[] = {"EURUSD", "GBPUSD", "AUDUSD", "USDJPY", "USDCAD"};

double Sum2 = 0;

double GetBid( const string &Symb )
{
  static MqlTick Tick;

  return(SymbolInfoTick(Symb, Tick)? Tick.bid : 0);
}

void OnInit()
{
  for (int i = 0; i < AmountSymbols; i++)
    if (Symbols[i] != _Symbol)
      iCustom(Symbols[i], PERIOD_W1, "Spy.ex5", ChartID(), i); // MQL5\Indicators\Spy.ex5
}

void OnDeinit( const int )
{
  Print(Sum2);
}

void OnTick()
{
  OnTick(_Symbol); 
}

void OnTick( const string &Symb )
{
  Sum2 += GetBid(Symb);
}

void OnChartEvent( const int id, const long &lparam, const double&, const string& )
{
  if (id == CHARTEVENT_CUSTOM)
    OnTick(Symbols[(int)lparam]);
}


One symbol

i = 0 Pass = 0 OnTester = 2.697 s.: Count = 9986677, 3702883.6 unit/sec, Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1755
i = 1 Pass = 1 OnTester = 2.657 s.: Count = 9986677, 3758628.9 unit/sec, Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1755


Two symbols

i = 0 Pass = 0 OnTester = 17.632 s.: Count = 9986677, 566395.0 unit/sec, Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1755
i = 1 Pass = 1 OnTester = 17.539 s.: Count = 9986677, 569398.3 unit/sec, Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1755


Three symbols

i = 0 Pass = 0 OnTester = 35.639 s.: Count = 9986677, 280217.7 unit/sec, Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1755
i = 1 Pass = 1 OnTester = 35.462 s.: Count = 9986677, 281616.3 unit/sec, Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1755


Four symbols

i = 0 Pass = 0 OnTester = 68.459 s.: Count = 9986677, 145878.2 unit/sec, Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1755
i = 1 Pass = 1 OnTester = 69.429 s.: Count = 9986677, 143840.1 unit/sec, Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1755
Анализ результатов тестов и оптимизации в тестере стратегий MetaTrader 5
Анализ результатов тестов и оптимизации в тестере стратегий MetaTrader 5
  • 2018.01.28
  • www.mql5.com
Рассмотрим результаты тестов на одном и нескольких символах. Тесты будем проводить в режиме Все тики...
 
Fast528:

Look, the onchartivent receives ticks from each symbol, but in this robot, when each tick comes for a symbol, it also runs a loop on all these pairs, so this loop should be removed

That's right - it should receive all ticks for all pairs

 
Anatoli Kazharski:

This is currently the best solution: https://www.mql5.com/ru/forum/225832/page2#comment_6406538

And in the tester, how do you solve this issue?

 
Anatoli Kazharski:

This is the best solution at the moment: https://www.mql5.com/ru/forum/225832/page2#comment_6406538

Can I post your Spy indicator here or will the one in the article do?

 
Tango_X:

That's right - it should receive all ticks for all pairs

The onchartivent receives ticks for all symbols, and the loop increases signal processing by a multiple

A tick came for the euro, and all pairs ran with it..., then a tick came for another pair and again all pairs from the list ran, **smooth work

 
Andrey Barinov:

How do you solve this question in the tester?

It works in the tester too.

 
Anatoli Kazharski:

Works in the tester as well.

Thank you. Point me in the direction of Spy.ex5 (preferably .mq5)