Download MetaTrader 5

Is it possible to remove the "Show Trade Panel" arrow using MQL4 expert advisor?

To add comments, please log in or register
kenshin71
16
kenshin71  

I am writing a basket trading ea, and so I am replacing the whole chart window with a custom user interface.  To do this, I have written an initialization function that removes all the stuff that the chart shows by default, so that I can start with a black screen.

This works well, but I have not found a way to remove the small down pointing arrow at the top-left of the chart.  This tiny arrow is used to show and hide the "Trade Panel" interface which I would like to remove from the chart.  Even more annoyingly, that little arrow appears on top of every object I create, so there doesn't seem to be a way just to cover it with a black rectangle object.  I found that by using the "Colour Properties" menu in MT4 and setting the foreground colour to black makes it invisible, but it's still there.  Strangely, if I use the "CHART_COLOR_FOREGROUND" property in my ea and set it to black, then that pesky arrow is still there showing in white.

Does anyone have any MQL4 code that can be used to remove that arrow completely, or is there some other way I can stop it from being overlayed on top of my interface?

Any help would be much appreciated.

Here is the code I am using to blank the chart:

void MT4_Initialize()
{
  ChartSetInteger(0,CHART_SHOW_GRID,0,0);
  ChartSetInteger(0,CHART_SHOW_OHLC,0,0);
  ChartSetInteger(0,CHART_SHOW_BID_LINE,0,0);
  ChartSetInteger(0,CHART_SHOW_ASK_LINE,0,0);
  ChartSetInteger(0,CHART_SHOW_TRADE_LEVELS,0,0);
  ChartSetInteger(0,CHART_SHOW_DATE_SCALE,0,0);
  ChartSetInteger(0,CHART_SHOW_PRICE_SCALE,0,0);
  ChartSetInteger(0,CHART_SHOW_VOLUMES,0,0);
  ChartSetInteger(0,CHART_MODE,0,CHART_LINE);
  ChartSetInteger(0,CHART_COLOR_CHART_LINE,0,clrNONE);
  ChartSetInteger(0,CHART_COLOR_BACKGROUND,0,clrBlack);
}
Alain Verleyen
Moderator
33334
Alain Verleyen  
kenshin71:

Does anyone have any MQL4 code that can be used to remove that arrow completely, or is there some other way I can stop it from being overlayed on top of my interface?

...
ChartSetInteger(0,CHART_SHOW_ONE_CLICK,0,false);
whroeder1
15917
whroeder1  
Alain Verleyen: CHART_SHOW_ONE_CLICK
Not listed in List of MQL4 Constants - MQL4 Reference
Alain Verleyen
Moderator
33334
Alain Verleyen  
Never mind, it works.
kenshin71
16
kenshin71  
Thankyou.  Works here too.  You've made my day.:)
To add comments, please log in or register