Hide Indicator in DataWindow

 

Hi Forum, I am a newbie here and started programming respectively adopting existing codes on Friday. I have already concluded several custom indicators and now my DataWindow is more than full and I would have to scroll up and down all the time...

The question is: is there a possibility to define within a custom indicator that it will not be shown in the DataWindow at all?

Many thanks in advance 

 
try SetIndexLabel(0, "")
 
PERFECT!!!! Thanks a lot, WHRoeder!!!
 
whroeder1:
try SetIndexLabel(0, "")

I need to do this myself. I've seen this suggestion quite a bit. But, SetIndexLabel function doesn't seem to exist in mql5. It doesn't come up in the documentation online either. What am I missing? Everyone keeps thanking the providers of this information.

 
gary0318: I need to do this myself. I've seen this suggestion quite a bit. But, SetIndexLabel function doesn't seem to exist in mql5. It doesn't come up in the documentation online either. What am I missing? Everyone keeps thanking the providers of this information.

First off, please remember that this thread is in the MT4/MQL4 section, so obviously the posters are working for the most part with MQL4 (and not MQL5).

However, for MQL5, the equivalent function (and property ID)  is the following: PlotIndexSetString(  ..., PLOT_LABEL,  ... )

 
Fernando Carreiro:


However, for MQL5, the equivalent function (and property ID)  is the following: PlotIndexSetString(  ..., PLOT_LABEL,  ... )


Although it is true that equivalent function in mql5 is the one you mention, instead in mql5 that function does not produce the desired effect by OP (and by @gary0318, I suppose).

.


PlotIndexSetString(0, PLOT_LABEL, "");      

/*  This doesn't hide buffer values in Data Window.  

It only causes the label name to be the same as the indicator short-name 
(overwriting any other name that you would have designated in the preprocessor directive #property indicator_labelX, if you had specified it). 

But with one label name or another, the buffer values continue to appear in Data Window.
*/


In mql5, to hide the values of a buffer in the Data Window, you should use:


PlotIndexSetInteger(plot_index, PLOT_SHOW_DATA, false);


In this way, nothing will appear at all in the Data Window (neither the label nor the buffer values).


Regards.

 
Fernando Carreiro:

Actually, I was only focused on the MQL5 equivalent function and had not noticed that the thread was about hiding the plot.

In MQL4 however, personally I don't use this method as I always assign a Label Name irrespective of if being visible or not. Instead, I prefer setting the "Drawing Type" to "DRAW_NONE", which makes more sense to me than setting an empty Label Name.

I realized that you only focused on the equivalent function. When reading fast, it usually happens, lol.

No, it is not about hiding the plotting, but rather that the buffer should be plotted, but its values should not be shown in the Data Window.

If you use DRAW_NONE, nothing is plotted. I think what OP wanted was to plot buffers, but not to show anything at all in the data window.

Regards.
 
Jose Francisco Casado Fernandez:
I realized that you only focused on the equivalent function. When reading fast, it usually happens, lol.

No, it is not about hiding the plotting, but rather that the buffer should be plotted, but its values should not be shown in the Data Window.

If you use DRAW_NONE, nothing is plotted. I think what OP wanted was to plot buffers, but not to show anything at all in the data window.

Regards.
Thanks, Jose. For my efforts, I needed both issues and a combination of DRAW_NONE and PLOT_SHOW_DATA = false did the trick.
Reason: