Download MetaTrader 5
To add comments, please log in or register
Added support for the Spanish language. Come and check it out!
Jordi Bassaganas
3527
Jordi Bassaganas 2013.09.18 10:02 

Hi there,

I'd like to plot a discontinuous indicator which is defined only in some intervals.

My indicator only has one buffer:

SetIndexBuffer(0,myOnlyBuffer,INDICATOR_DATA);

I am assuming that it is possible to assign NULL in some positions of myOnlyBuffer (if you assign NaN values to arrays in GNU/Octave then they are not plotted) in order for MT5 to ignore those points later, when plotting the indicator. However those points are plotted and the indicator doesn't look very good in the empty intervals.

How can you define arrays in order to plot discontinous indicators? Is this approach ok?

Thks in advance for your tips

Alain Verleyen
Moderator
30635
Alain Verleyen 2013.09.18 10:51  
laplacianlab:

Hi there,

I'd like to plot a discontinuous indicator which is defined only in some intervals.

My indicator only has one buffer:

I am assuming that it is possible to assign NULL in some positions of myOnlyBuffer (if you assign NaN values to arrays in GNU/Octave then they are not plotted) in order for MT5 to ignore those points later, when plotting the indicator. However those points are plotted and the indicator doesn't look very good in the empty intervals.

How can you define arrays in order to plot discontinous indicators? Is this approach ok?

Thks in advance for your tips

Already asked and answered ;-)


myOnlyBuffer[i] = EMPTY_VALUE;
Jordi Bassaganas
3527
Jordi Bassaganas 2013.09.18 11:44  
angevoyageur:
Already asked and answered ;-)


That was great (and a bit difficult to find..) Thks!
/
To add comments, please log in or register