stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

DRAW_LINE function
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1474
Page 1 of 1
Author:  scheinwerfer [ Sun Feb 10, 2013 8:00 pm ]
Post subject:  DRAW_LINE function

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)?
Author:  gaheitman [ Mon Feb 11, 2013 7:42 am ]
Post subject:  Re: DRAW_LINE function

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
Author:  scheinwerfer [ Mon Feb 11, 2013 1:31 pm ]
Post subject:  Re: DRAW_LINE function

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
All times are UTC Page 1 of 1