mybase89 发表于 2025-5-3 06:30:17

let mql4 support multithread


script to open multi chart to simulate a thread
void OnStart()
{
//---
for(int x=1;x<=20;x++)
      {
      ChartApplyTemplate(ChartOpen(NULL,1),"a");
      }   
}

EA to get each chart id used to set "thread" parameter
long id;
int OnInit()
{

long aaaid=ChartFirst();
for(int x=1;x<=20;x++)
      {       if(aaaid==ChartID())
    { id=x;return(INIT_SUCCEEDED);
      
      }
      aaaid=ChartNext(aaaid);

}

//---bid=Bid;
   return(INIT_SUCCEEDED);
}
页: [1]
查看完整版本: let mql4 support multithread