I codeing in C++ and I'm using the version 6.0.0.6
Here is the code I used to create my bar chart:
Code: Select all
m_cTChart.AddSeries(scBar);
m_cTChart.Series(VOL_SER).SetHorizontalAxis(aBottomAxis);
m_cTChart.Series(VOL_SER).SetVerticalAxisCustom(0);
m_cTChart.Series(VOL_SER).GetMarks().SetVisible(false);
m_cTChart.Series(VOL_SER).GetAsBar().SetBarWidth(0);
m_cTChart.Series(VOL_SER).GetAsBar().SetBarWidthPercent(100);
m_cTChart.Series(VOL_SER).GetPen().SetWidth(0);
m_cTChart.Series(VOL_SER).GetPen().SetStyle(psClear);
m_cTChart.Series(VOL_SER).GetPen().SetVisible(true);
m_cTChart.Series(VOL_SER).GetPen().SetEndStyle(esFlat);
Code: Select all
while( !rs.IsEOF( ) )
{
for( int rowCount = 0;
rowCount < (int)rs.GetRowsFetched();
rowCount++ )
{
m_cTChart.Series(PRICE_SER).GetAsCandle().AddCandle(rowCount+j,
rs.m_Open_blk[rowCount],
rs.m_High_blk[rowCount],
rs.m_Low_blk[rowCount],
rs.m_Close_blk[rowCount] );
m_cTChart.Series(VOL_SER).Add( rs.m_Volume_blk[rowCount]/100.0 , "");
// Date value MM/DD/YYYY
t.clear();
t.setTime(rs.m_Date_blk[rowCount], YYYYMMDD);
m_cTChart.Series(1).SetPointLabel(rowCount+j,
t.toString(MM_DD_YY,/").c_str() );
chg = rs.m_Close_blk[rowCount] - close;
open = rs.m_Open_blk[rowCount];
high = rs.m_High_blk[rowCount];
low = rs.m_Low_blk[rowCount];
close = rs.m_Close_blk[rowCount];
}
j += 2000;
rs.MoveNext( );
}
rs.Close();