Download MetaTrader 5
To add comments, please log in or register
Download documentation as one file. It is easy!
Betowm
136
Betowm 2014.09.05 12:08 

Hello guys. I am writing from Argentina I hope you will understand my bad English.

 

My question is :  It is possible select a chart automatically?

 

This is my case:  I have an "alert line" that make a noise when the price touches it.
But usually I use this alert line not only in a single chart but on many of them.
The problem is when I hear the alert and I must watch all of the charts looking for wich of them is sounding.
I tryed some solutions, as use different noises but I always forget what type of noise I have assigned to each chart and reviewing of 10 or 15 charts is very stressful, principally when I must do this quickly.
I would to know if there is a code line I can add to the line so, when the alert begin to sound, the corresponding selected graphic appears on the screen.
I hope somebody want responding me
Best regards
Betowm
d4v3
28
d4v3 2014.09.05 12:48  

From MQL4 help:

//+----------------------------------------------------------------------+
//| Send command to the terminal to display the chart above all others.  |
//+----------------------------------------------------------------------+
bool ChartBringToTop(const long chart_ID=0)
  {
//--- reset the error value
   ResetLastError();
//--- show the chart on top of all others
   if(!ChartSetInteger(chart_ID,CHART_BRING_TO_TOP,0,true))
     {
      //--- display the error message in Experts journal
      Print(__FUNCTION__+", Error Code = ",GetLastError());
      return(false);
     }
//--- successful execution
   return(true);
  }
Betowm
136
Betowm 2014.09.05 13:50  
d4v3:

From MQL4 help:


¡¡ THANK YOU VERY MUCH !!  I will try the code right now

kind regards from Argentina

 Betowm 

/
To add comments, please log in or register