Box size In Point Figure Chart
Posted: Mon May 18, 2009 8:50 pm
Set rs = New ADODB.Recordset
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Source = "stock_price"
rs.ActiveConnection = db
rs.Open "select * stock_price"
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
TChart1.Series(0).asPointFigure.DateValues.ValueSource = rs.Fields(3).Name
TChart1.Series(0).asPointFigure.BoxSize =xx
TChart1.Series(0).asPointFigure.ReversalAmount = 3
TChart1.Series(0).CheckDataSource
The xx Variable Value depend on The Value Of Close price
4 Example If Close price between 5 to 10 The box Size Value Must To be 1
If Close price between 10.1 to 20 The box Size Value Must To be 2
But The TChart Fixed the Box size value and the reversal amount
Now i need the code How To Change the Box size Value and reversal Amount during Drawing Point Figure Chart from data base file
Because The Close Price value defined The Box Size value
Thanks 4 Ever
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Source = "stock_price"
rs.ActiveConnection = db
rs.Open "select * stock_price"
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
TChart1.Series(0).asPointFigure.DateValues.ValueSource = rs.Fields(3).Name
TChart1.Series(0).asPointFigure.BoxSize =xx
TChart1.Series(0).asPointFigure.ReversalAmount = 3
TChart1.Series(0).CheckDataSource
The xx Variable Value depend on The Value Of Close price
4 Example If Close price between 5 to 10 The box Size Value Must To be 1
If Close price between 10.1 to 20 The box Size Value Must To be 2
But The TChart Fixed the Box size value and the reversal amount
Now i need the code How To Change the Box size Value and reversal Amount during Drawing Point Figure Chart from data base file
Because The Close Price value defined The Box Size value
Thanks 4 Ever