Search for sub windows
Maksim Neimerik:
Hello coders! Please tell me how to find the number of sub-windows of a graph that is not the current one?
On the current graph - no problems (WindowsTotal()), but on other graphs...
Hello you can use :
ChartGetInteger(chart_id,CHART_WINDOWS_TOTAL)
Here is a test case :
#property strict int OnInit() { //--- create timer // EventSetTimer(60); string msg=""; long cid=ChartFirst(); int wins=(int)ChartGetInteger(cid,CHART_WINDOWS_TOTAL); msg+=IntegerToString(cid)+"::"+IntegerToString(wins)+"\n"; while(cid!=INVALID_HANDLE){ cid=ChartNext(cid); if(cid!=INVALID_HANDLE){ wins=(int)ChartGetInteger(cid,CHART_WINDOWS_TOTAL); msg+=IntegerToString(cid)+"::"+IntegerToString(wins)+"\n"; } } Comment(msg); return(INIT_SUCCEEDED); } void OnTick() { }
Hello coders! Please tell me how to find the number of sub-windows of a graph that is not the current one?
On the current graph - no problems (WindowsTotal()), but on other graphs...