Give Focus to chart by "ChartID"

 

I cannot find any code that will give "focus" to by ChartID

If I have 4 charts open I would like to give focus to 1 when conditions are met..


Can anyone guide in the right direction.

I dont care if its a script, ea, indicator ,article or some forum discussion

something I could use or figure out

(no dll solutions without source)

 
Fixed it never mind..
 
pi.xero: Fixed it never mind..

Don't do that. Someone searching might find this thread and still be clueless. What was the problem? What solved what?

How To Ask Questions The Smart Way. 2004
     When You Ask.
          Follow up with a brief note on the solution.

 
William Roeder:

Don't do that. Someone searching might find this thread and still be clueless. What was the problem? What solved what?

How To Ask Questions The Smart Way. 2004
     When You Ask.
          Follow up with a brief note on the solution.

Thank you sorry about that..

I used..


 
//---
//--- Must change the handle number for chart identification
long handle = 132449501876835828; 


//--- show the chart on top of all others   
long bufferID=handle;

   if(bufferID==-1){
      bufferID=ChartFirst();
      }
      
   int getchart = ChartSetInteger(bufferID,CHART_BRING_TO_TOP,0,true);
   
   if(bufferID!=-1){
      ChartRedraw(bufferID);
      WindowRedraw();
      }
  }
Documentation on MQL5: Chart Operations / ChartID
Documentation on MQL5: Chart Operations / ChartID
  • www.mql5.com
ChartID - Chart Operations - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: