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);
}
|
|
|
|
|