Page 1 of 1

creating .canvas.lineto a high or low in a candle chart

Posted: Fri Apr 30, 2004 3:03 pm
by 9082030
I'm using the following code to create a line to designated points on the a candle chart:

.Canvas.LineTo .Axis.Bottom.CalcXPosValue(.Series(0).XValues.Value(pt)), _
.Axis.Left.CalcYPosValue(.Series(0).YValues.Value(pt))


This works great for overlaying a line to the closing value, but I wants to send a line to a high or low value... How would I do that?

Posted: Mon May 03, 2004 8:27 am
by Pep
Hi,
This works great for overlaying a line to the closing value, but I wants to send a line to a high or low value... How would I do that?
for the low values you can do this :

Code: Select all

With TChart1    
    centery = .Axis.Left.CalcYPosValue(.Series(0).asCandle.LowValues.Value(3))
    centerx = .Axis.Bottom.CalcXPosValue(.Series(0).asCandle.DateValues.Value(3))
    .Canvas.LineTo centerx, centery
End With