DRAW_LINE function

Post Reply
scheinwerfer
Trader
Posts: 42
Joined: Mon Dec 12, 2011 12:36 am

DRAW_LINE function

Post by scheinwerfer »

I've set it it up like this:

Code: Select all

SetIndexStyle(4,DRAW_LINE);
   SetIndexBuffer(4,hi);
Problem - there's no line...

Arrow works, histogram works, but it can't draw the bloody line between the data points.

Can it be that it gets not drawn because there is a 5 bar gap between the data points (value only on every 5th bar)?
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: DRAW_LINE function

Post by gaheitman »

Could be. I believe if you have the value of hi[x] set to whatever SetIndexEmptyValue() equals it won't draw to that bar or away from that bar. You need valid values in adjacent bars for Empty4 to draw the line segment on the chart.

If it makes sense on your indicator, you could always set hi[i+1] and hi at the same time (and to the same value) as you currently set hi so that you get a series of line segments.

George
scheinwerfer
Trader
Posts: 42
Joined: Mon Dec 12, 2011 12:36 am

Re: DRAW_LINE function

Post by scheinwerfer »

Thanks for the reply, George! I got it working, DRAW_SECTION did the trick. Interestingly, I found there's a DRAW_ZIGZAG also, which should work, no word on it in the manual though.

Thanks again and take care!
Sch
Post Reply

Return to “Coders Hangout”