Question on Darvas Charts - High/Low Box Data
Question on Darvas Charts - High/Low Box Data
I am trying to retrieve some data from the created Darvas Chart. Specifically I would like to retrieve both the High & Low box values for the most recent/current "darvas box" on the chart - I am using VFP, but VB code would be fine too. I see where you can retrieve the number of boxes created, but I want to be able to get the High & Low values of the last box created.
Hi TomB,
You could use some code lika following:
Note that you may need to call the following function in order to update the series values and include the last point added to the calculation:
You could use some code lika following:
Code: Select all
TChart1.Series(0).asDarvas.HighValues.Value(TChart1.Series(0).Count - 1)
TChart1.Series(0).asDarvas.LowValues.Value(TChart1.Series(0).Count - 1)
Code: Select all
TChart1.Environment.InternalRepaint
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
I see where you can get the individual candle High/Low/Close with your suggestion, but what I am trying to get is the Shaded Darvas Box itself's High/Low Values - the candlesticks are contained with the Darvas Box.
I see where you can get the number of Darvas Boxes with:
TChart1.Series(0).asDarvas.NumBoxes but I do not readily see where to get the High/Low values of the current Darvas Box or any selected Darvas Box on the Chart (I would like to be able to retrieve High/Low of any selected Darvas Box).
Thanks in advance for the help
I see where you can get the number of Darvas Boxes with:
TChart1.Series(0).asDarvas.NumBoxes but I do not readily see where to get the High/Low values of the current Darvas Box or any selected Darvas Box on the Chart (I would like to be able to retrieve High/Low of any selected Darvas Box).
Thanks in advance for the help
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi TomB,
Yes, this is possible. You can do something like this:
Yes, this is possible. You can do something like this:
Code: Select all
Private Sub TChart1_OnMouseDown(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
Dim BoxIndex As Integer
With TChart1.Series(1).asDarvas
BoxIndex = .ClickedBox(X, Y)
TChart1.Header.Text.Clear
TChart1.Header.Text.Add ("High: " & CStr(TChart1.Axis.Left.CalcPosPoint(.BoxesRect(BoxIndex).Top)))
TChart1.Header.Text.Add ("Low: " & CStr(TChart1.Axis.Left.CalcPosPoint(.BoxesRect(BoxIndex).Bottom)))
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 |