Download MetaTrader 5

Undesired zero level in indcators ...

To add comments, please log in or register
Mladen Rakic
Mladen Rakic  

I think it has been asked already, but nevertheless, I am repeating the question :

Is the zero level that appears in indicators when they are drawn in a subwindow without even specifying a zero level going to be removed or not? Why is there an assumption that a zero level must be drawn whether the user wants it or not? Here is an example of what am I talking about (along with the code the causes that). If we want levels, shouldn't we be the ones to decide about it and not the terminal?

It is annoying and in some indicators even plain wrong to have that zero level when it is not asked for

#property indicator_separate_window
#property indicator_buffers  0
#property indicator_plots    0
#property indicator_maximum  1
#property indicator_minimum -1

void OnInit() { }
int OnCalculate(const int rates_total,const int prev_calculated,
                const datetime &Time[],
                const double &Open[],
                const double &High[],
                const double &Low[],
                const double &Close[],
                const long &TickVolume[],
                const long &Volume[],
                const int &Spread[])
To add comments, please log in or register