Multi-line series.
Multi-line series.
I'm not familiar with TeeChart (ActiveX) and I have to do following: In trading application I have to add some indicators which have two or more lines as a result (similar to Bollinger Bands). Moreover some of these indicators must have their own axis (not shared with main price series) and sometimes these lines must have different colors. Problem is that whatever I tried I couldn't make this work and I couldn't find an example how to do this. Can anyone help me with some hints how this can be made.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Lars67,
To have the lines set to different axes you should read Tutorial 4 - Axis Control. Also could help reading Tutorial 6 - Working with Series.
Also, example of this can be found at the features demo, specially at All Features\Welcome!\Axes.
You'll find the tutorials and features demo at TeeChart's program group.
To have the lines set to different axes you should read Tutorial 4 - Axis Control. Also could help reading Tutorial 6 - Working with Series.
Also, example of this can be found at the features demo, specially at All Features\Welcome!\Axes.
You'll find the tutorials and features demo at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Lars67,
Ok, then you need to create additional series for each band, for example:
Ok, then you need to create additional series for each band, for example:
Code: Select all
Private Sub Form_Load()
Dim Index As Integer
InitSeries (Index)
For i = 0 To 10
AddSeriesValue Index, Now + i, Rnd, Rnd, Rnd, Rnd
Next
End Sub
Private Sub InitSeries(ByRef CandleIndex As Integer)
CandleIndex = TChart1.AddSeries(scCandle)
TChart1.AddSeries scLine
TChart1.AddSeries scLine
End Sub
Private Sub AddSeriesValue(ByVal Series As Integer, ByVal D As Double, ByVal O As Double, _
ByVal H As Double, ByVal L As Double, ByVal C As Double)
With TChart1
.Series(Series).asCandle.AddCandle D, O, H, L, C
.Series(Series + 1).AddXY D, H + 5, "", clTeeColor
.Series(Series + 2).AddXY D, L - 5, "", clTeeColor
End With
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |