How tchart ocx calculate P&f with close price using visu
Posted: Sun May 10, 2009 7:10 pm
am currently building an application, which uses Point and Figure Charts.
I would like to know is more about how TChart calculates Point and Figure Charts.
We would like to provide three charts in a variety of ways based on:
-Closing Price.
-High or low price for upward movements and downward movements respectively.
-Typical price (calculated as: (High + Low + Close) / 3.)
I would like more information on how TChart calculates the point and figure chart and what it is based on using Visual Basic 6 code
the next code i can't controlled To how to cacualte
Private Sub chk_box()
Set rs2 = New ADODB.Recordset
rs2.CursorType = adOpenKeyset
rs2.LockType = adLockOptimistic
rs2.Source = "ind8"
rs2.ActiveConnection = db
rs2.Open
rs2.MoveFirst
f = rs2!cp
Select Case f
Case 0.1 To 5
r = 0.25
Case 5.1 To 20
r = 0.5
Case 20.1 To 100
r = 1
Case 100.1 To 200
r = 3
Case 200 To 1000
r = 5
End Select
End Sub
Private Sub dr_chart()
Me.Label1.Caption = r
Dim rs As New ADODB.Recordset
Set rs = New ADODB.Recordset
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Source = "ind8"
rs.ActiveConnection = db
rs.Open "select * from ind8" ' where comp_code='" & Me.txt2 & "'" & "and ema1<>0 " & " order by stock_date"
' Retrieve records....
TChart1.Series(0).DataSource = rs
TChart1.Series(0).asPointFigure.OpenValues.ValueSource = rs.Fields(4).Name
TChart1.Series(0).asPointFigure.CloseValues.ValueSource = rs.Fields(7).Name ' close
TChart1.Series(0).asPointFigure.HighValues.ValueSource = rs.Fields(5).Name
TChart1.Series(0).asPointFigure.LowValues.ValueSource = rs.Fields(6).Name
' TChart2.Series(0).asPointFigure.DateValues.ValueSource = rs.Fields(3).Name
TChart1.Series(0).asPointFigure.BoxSize = r
TChart1.Series(0).asPointFigure.ReversalAmount = 3
End Sub
Now i want to know How To Calculate Or Draw X Or O
using Close Price
Can U Provide me sample Code
Thank 4 ever
I would like to know is more about how TChart calculates Point and Figure Charts.
We would like to provide three charts in a variety of ways based on:
-Closing Price.
-High or low price for upward movements and downward movements respectively.
-Typical price (calculated as: (High + Low + Close) / 3.)
I would like more information on how TChart calculates the point and figure chart and what it is based on using Visual Basic 6 code
the next code i can't controlled To how to cacualte
Private Sub chk_box()
Set rs2 = New ADODB.Recordset
rs2.CursorType = adOpenKeyset
rs2.LockType = adLockOptimistic
rs2.Source = "ind8"
rs2.ActiveConnection = db
rs2.Open
rs2.MoveFirst
f = rs2!cp
Select Case f
Case 0.1 To 5
r = 0.25
Case 5.1 To 20
r = 0.5
Case 20.1 To 100
r = 1
Case 100.1 To 200
r = 3
Case 200 To 1000
r = 5
End Select
End Sub
Private Sub dr_chart()
Me.Label1.Caption = r
Dim rs As New ADODB.Recordset
Set rs = New ADODB.Recordset
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Source = "ind8"
rs.ActiveConnection = db
rs.Open "select * from ind8" ' where comp_code='" & Me.txt2 & "'" & "and ema1<>0 " & " order by stock_date"
' Retrieve records....
TChart1.Series(0).DataSource = rs
TChart1.Series(0).asPointFigure.OpenValues.ValueSource = rs.Fields(4).Name
TChart1.Series(0).asPointFigure.CloseValues.ValueSource = rs.Fields(7).Name ' close
TChart1.Series(0).asPointFigure.HighValues.ValueSource = rs.Fields(5).Name
TChart1.Series(0).asPointFigure.LowValues.ValueSource = rs.Fields(6).Name
' TChart2.Series(0).asPointFigure.DateValues.ValueSource = rs.Fields(3).Name
TChart1.Series(0).asPointFigure.BoxSize = r
TChart1.Series(0).asPointFigure.ReversalAmount = 3
End Sub
Now i want to know How To Calculate Or Draw X Or O
using Close Price
Can U Provide me sample Code
Thank 4 ever