Download MetaTrader 5

In PlotIndexSetInteger(), what does the first parameter mean?

To add comments, please log in or register
nicolasxu
296
nicolasxu 2015.01.18 08:57 

In the document here, it says the first param is the Index of the graphical plotting. Graphic plotting is one of the ENUM_DRAW_TYPE. 

 

Why it is always 0 in the example here? I think it should be one of the ENUM_DRAW_TYPE. Why it is not? 

               PlotIndexSetInteger(0,PLOT_LINE_COLOR,0,clrRed);
               PlotIndexSetInteger(0,PLOT_LINE_COLOR,1,clrBlue);
               PlotIndexSetInteger(0,PLOT_LINE_COLOR,2,clrGreen);
Alain Verleyen
Moderator
31137
Alain Verleyen 2015.01.18 11:23  
nicolasxu:

In the document here, it says the first param is the Index of the graphical plotting. Graphic plotting is one of the ENUM_DRAW_TYPE. 

 

Why it is always 0 in the example here? I think it should be one of the ENUM_DRAW_TYPE. Why it is not? 

The documentation say :

plot_index

[in]  Index of the graphical plotting

It's an int not an enum.

//---- plot ColorLine
#property indicator_label1  "ColorLine"
#property indicator_type1   DRAW_COLOR_LINE
#property indicator_color1  clrRed,clrGreen,clrBlue

The plot is a colorline : 1 plot, 2 buffers. So a colored line with 3 colors. The code you posted set the 3 colors for the plot 1 (indexed as 0).

nicolasxu
296
nicolasxu 2015.01.19 04:43  
angevoyageur:

The documentation say :

It's an int not an enum.

The plot is a colorline : 1 plot, 2 buffers. So a colored line with 3 colors. The code you posted set the 3 colors for the plot 1 (indexed as 0).

Thanks!
To add comments, please log in or register