Indicator freezing my metatrader during peak trading hours

 

Friends, I made a custom indicator with a basket of symbols to make a signal bullish or bearish for a index.

The indicator works fine and does not freeze during low volume trading hours.

But for high volume trading hours the indicator gets too heavy with the calculations and freezes my entire metatrader 5 platform.

I would be willing to sacrifice some calculations, for example, calling the function OnCalculate only 5 times per minute, insted of what it natively does which is to be called for every tick.

How could I slow down the frequency of calling the OnCalculation function?

Documentação sobre MQL5: Elementos Básicos da Linguagem / Funções / Funções de Manipulação de Evento
Documentação sobre MQL5: Elementos Básicos da Linguagem / Funções / Funções de Manipulação de Evento
  • www.mql5.com
A linguagem MQL5 fornece processamento de alguns eventos pré-definidos . Funções para manipulação destes eventos...