Can someone tell me why I get these broken line when I am display this indicator line.
Broken likes shows up only when there is change in color. I can see that data window and for each Bar there is correct data displayed.
However, the area in between the bars when there is change in color is not displayed and shows up as broken lines as sown in picture.
I have properly set the buffer parameters and I dont see anything wron with the declaration.
For example, corresponding above broken line I have following declaration:
SetIndexStyle(2, DRAW_LINE);
SetIndexBuffer(2, SignalBufferUp);
SetIndexLabel(2, "SignalUp");
SetIndexStyle(3, DRAW_LINE);
SetIndexBuffer(3, SignalBufferDn);
SetIndexLabel(3, "SignalDn");
SignalBufferUp corresponds to Lime color part of line and SignalBufferDn corressponds to Magenta colr part of line.
I would greatly appreciate if someone can clarify this and tell me how I can get continuous line of the indicator.
might be no value or empty value for both buffers at that bar number
with iCustom you can check the buffervalues of your indicator
for us there is nothing to check we have no source file
As you can see in the above picture actually the broken line (or blank) comes in between the Bar (histogram Bar) for each Bar there is correct value (Not EMPTY_VALUE) as i can see in DATA Window.
This happens only when there is change in color in the line.
Here is the code for this indicator:
#property copyright "Copyright © 2004, MetaQuotes Software Corp."
#property link "http: //www.metaquotes.net/"
<SNIP>
As you can see in the above picture actually the broken line (or blank) comes in between the Bar (histogram Bar) for each Bar there is correct value (Not EMPTY_VALUE) as i can see in DATA Window.
This happens only when there is change in color in the line.
Here is the code for this indicator:
#property copyright "Copyright © 2004, MetaQuotes Software Corp."
#property link "http: //www.metaquotes.net/"
<SNIP>
Please use this to post code . . . it makes it easier to read.
Can someone tell me why I get these broken line when I am display this indicator line.
Broken likes shows up only when there is change in color. I can see that data window and for each Bar there is correct data displayed.
Are you saying that in order to draw a line from where one stops and the other starts both buffers have the same value at the stop/start point?
Of course they do.
To draw a line you need a start point and an end/stop point. If you just have a start point you will get a dot not a line. :-) The cyan line ends where the green one starts, not the bar before it . . . if that isn't the case then the gaps are the correct behaviour . . . . the OP can't have it both ways.
might be no value or empty value for both buffers at that bar number
with iCustom you can check the buffervalues of your indicator
for us there is nothing to check we have no source file
Every bar has a value with your code but
A line is a connection from two points
the line starts when your buffer get the first value and ends when the next value is empty value
When the signal change there will be in between no connection from line points (two different lines)
Also
if bar 5 (buffer 3) empty value
bar 6 (buffer 3) 1.2454
bar 7 (buffer 3) empty value then there is also no line to draw (from buffer 3)
if you choose for arrows to draw a dotted line then you will see in this case a color for bar 6
For making it dots displaying change
SetIndexStyle(2, DRAW_LINE); SetIndexBuffer(2, SignalBufferUp); SetIndexLabel(2, "SignalUp"); SetIndexStyle(3, DRAW_LINE); SetIndexBuffer(3, SignalBufferDn); SetIndexLabel(3, "SignalDn");
into something like
SetIndexStyle(2, DRAW_ARROW,0,3);//DRAW_LINE); SetIndexArrow(2, 159); SetIndexBuffer(2, SignalBufferUp); SetIndexLabel(2, "SignalUp"); SetIndexStyle(3, DRAW_ARROW,0,3);//DRAW_LINE); SetIndexArrow(3, 159); SetIndexBuffer(3, SignalBufferDn); SetIndexLabel(3, "SignalDn");
thank you all.
I think displaying DOT(using DRAW_ARROW) is good idea rather than making buffer values same for start and end which will be ambiguous.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Can someone tell me why I get these broken line when I am display this indicator line.
Broken likes shows up only when there is change in color. I can see that data window and for each Bar there is correct data displayed.
However, the area in between the bars when there is change in color is not displayed and shows up as broken lines as sown in picture.
I have properly set the buffer parameters and I dont see anything wron with the declaration.
For example, corresponding above broken line I have following declaration:
SetIndexStyle(2, DRAW_LINE);
SetIndexBuffer(2, SignalBufferUp);
SetIndexLabel(2, "SignalUp");
SetIndexStyle(3, DRAW_LINE);
SetIndexBuffer(3, SignalBufferDn);
SetIndexLabel(3, "SignalDn");
SignalBufferUp corresponds to Lime color part of line and SignalBufferDn corressponds to Magenta colr part of line.
I would greatly appreciate if someone can clarify this and tell me how I can get continuous line of the indicator.