You'll have to use DRAW_LINE and linear interpolate buffer elements between the two end points.
Not compiled, not tested.
void draw_segment(double& buffer[], double vLast, int iLast, double vBeg, int iBeg){
for(int iBar = iLast; iBar >= iBeg; --iBar)
buffer[iBar] = vBeg + (vLast-vBeg) * (iBar-iBeg) / (iLast-iBeg);
}
Not compiled, not tested.for(int iBar = iLast; iBar >= iBeg; --iBar)
buffer[iBar] = vBeg + (vLast-vBeg) * (iBar-iBeg) / (iLast-iBeg);
}
ggladden:
Try to place EMPTY_VALUE inbetween of visible sections.
How can I draw lines using buffers in an EA to produce the following effect? Using one buffer with DRAW_SECTION makes one continuous line, I want it broken up into segments like this -
ggladden:
How can I draw lines using buffers in an EA to produce the following effect? Using one buffer with DRAW_SECTION makes one continuous line, I want it broken up into segments like this
Stanislav Korotky:
Try to place EMPTY_VALUE inbetween of visible sections.
Try to place EMPTY_VALUE inbetween of visible sections.
Cannot be done with DRAW_SECTION.
WHRoeder proposed a solution, there are others.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
How can I draw lines using buffers in an EA to produce the following effect? Using one buffer with DRAW_SECTION makes one continuous line, I want it broken up into segments like this -
Thanks in advance!