Dear all
I want to ask this code is not working in mql4
I don't know why ?
define not working?
show your code and any error messages
define not working?
show your code and any error messages
//+----------------------------------------------------------------------+ //| 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); }
ChartSetInteger(chart_ID, CHART_BRING_TO_TOP, 0, true) does not display the chart above all others although no error messages
Seems to me that you don't need the 3rd parameter. I don't know if it will make any difference though.
If I remember correctly, I think that this function will not always work if the charts are minimised.
the code works just fine, two thoughts:
1) are you sending the chart ID or 0 when calling the function like: ChartBringToTop(0) ?
2) are you running this when the market is closed? the chart will only redraw on a new tick, so if the market is closed you must force it with a ChartRedraw() after running the function
as I said it works fine.
the code works just fine, two thoughts:
1) are you sending the chart ID or 0 when calling the function like: ChartBringToTop(0) ?
2) are you running this when the market is closed? the chart will only redraw on a new tick, so if the market is closed you must force it with a ChartRedraw() after running the function
as I said it works fine.
Thank you, because I run code in closed market so I need ChartRedraw().
Thank a lot
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear all
I want to ask this code is not working in mql4
I don't know why ?