I'm using a candle series. Given a valid date for one of the candles, how do I get a percentage of where it is on the horizontal axis to pass to the ColorBand tool? What I am really trying to do is put vertical bands on the candle chart to show when in market positions.
Thanks in advance.
Mapping a candle series date to a horizontal axis percentage
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi Willy,
You could try something like the following:I'm using a candle series. Given a valid date for one of the candles, how do I get a percentage of where it is on the horizontal axis to pass to the ColorBand tool? What I am really trying to do is put vertical bands on the candle chart to show when in market positions.
Code: Select all
Private Sub Command1_Click()
With TChart1
.Tools.Add tcColorband
.Tools.Items(0).asColorband.Axis = .Axis.Bottom
.Tools.Items(0).asColorband.StartValue = DateValue("20/10/2004")
.Tools.Items(0).asColorband.EndValue = DateValue("25/10/2004")
End With
End Sub
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.AddSeries scCandle
.Series(0).FillSampleValues 20
End With
End Sub
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/