Total of expert on charts
khatery:
Sometimes expert become disabled.
i want code for find inactive expert on charts.
- Fix your broken code. Examine the log. Find out why.
- Code can't run if expert is disabled. Tab through the charts and look for a missing smiley face.
- Have the EA update a global (terminal) variable that includes the chart symbol. Then scan all with the appropriate pattern. Finding any more than 5 minutes old, means that symbol has stopped updating.
if (GlobalVariableCheck(Symbol())==true && GlobalVariableTime(Symbol())!=TimeCurrent())
GlobalVariableDel(Symbol());
else
if (GlobalVariableCheck(Symbol())==false)
{
GlobalVariableSet(Symbol(),0);
GlobalVariablesFlush();
}
long chartID=ChartFirst();
while(chartID >= 0)
{
if (GlobalVariableCheck(ChartSymbol(chartID))==false && glochek<=5)//5 repetitions
{
if (ChartSymbol(chartID)!=Symbol())
Alert("without expert=",ChartSymbol(chartID));
glochek++;
}
chartID = ChartNext(chartID);
}
GlobalVariableDel(Symbol());
else
if (GlobalVariableCheck(Symbol())==false)
{
GlobalVariableSet(Symbol(),0);
GlobalVariablesFlush();
}
long chartID=ChartFirst();
while(chartID >= 0)
{
if (GlobalVariableCheck(ChartSymbol(chartID))==false && glochek<=5)//5 repetitions
{
if (ChartSymbol(chartID)!=Symbol())
Alert("without expert=",ChartSymbol(chartID));
glochek++;
}
chartID = ChartNext(chartID);
}
void OnDeinit(const int reason)
{
//---
GlobalVariablesDeleteAll();
}
Thank you for your answer.
I have written this code in expert but it is objectionable.
Can we write a script for this?
Sorry i'm not good english
for example i have 20 or 30 open charts and one expert
Active in them
Sometimes expert become disabled.
i want code for find inactive expert on charts.
in other words find a chart that is without an expert .with help Alert and show symbol
Of course with mql4
Thank you for your advice