general question about start profiling on real data

 

Hi guys  i see the start profiling on real data after  this  when i stop i have  some  bar green and  blue  , anyone  have  documentation about it  how  can interpret this  ?

i saw in metatrader editor the tab  profile  i open and  i saw  what is stressed i attach a foto but  iOpen is stress the platform, but   how  is possible reduce the impact ??  exist somthing  that give a  suggest , i ask this  because if  EA stay open  after 40 min the  metatrader  is  very slow  and  i must remove EA , and  restart metatrader  for return to normal situation i suppose Ontick is problem , i call my script only one  time at hours, anyone have suggest  thanks

i try to use OnTimer instead OnTick , but not  start never  but  i belive i use  a good syntax


//+------------------------------------------------------------------+
//|                                                ScannerSpread.mq4 |
//|                                  Copyright 2023, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2023, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict

int timerHandle; // Variabile per gestire il timer
input int timerInterval = 60; // Intervallo del timer in secondi (1 ora 3600)


int OnInit()
  {
//---
 
      
      // Esempio di utilizzo della funzione
 timerHandle = EventSetTimer(timerInterval);
 
//---
   return(INIT_SUCCEEDED);
  }


void OnDeinit(const int reason)
  {
//---
   // Libera il timer alla chiusura dello script o dell'EA
    EventKillTimer();
    ObjectsDeleteAll(0);
  }


void OnTimer()
{
        Print ("do somthing ");
}


thanks at  all

Code profiling - Developing programs - MetaEditor Help
  • www.metatrader5.com
Profiling means collecting program parameters during its execution. During a profiling, the execution time and the number of calls of individual...
Files:
opti.jpg  231 kb
 
At the bottom of your post you find link to the doc.: https://www.metatrader5.com/en/metaeditor/help/development/profiling