Hi there!
I'm using Chart FX FE Desktop on an C++ Builder 4 platform. When I installed
my
ChartFX, I cannot display my Japanese Charts! I downloaded the service pack
from your site and so I am able to display the Japanese charts now. Problem
is,
if I keep traversing from one Japanese chart to another in the Gallery
toolbar,
it displays an EAccessViolation Error. Sometimes an error like : "The
instruction
at "0x10030a63" referenced memory at "0x00000000". The memory could not be
'written'." occurs.
Please help me trace the error...I have attached my code for further
reference.
Thank you very much!
Sincerely,
JONILIE L. ECHAVEZ
iDS Finance
Philippines
www.idsfinance.com
====================
#include <vcl.h>
#pragma hdrstop
#include "Sample.h"
#pragma package(smart_init)
#pragma link "ChartfxLib_OCX"
#pragma resource "*.dfm"
TForm1 *Form1;
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
FinExt = (FinancialCharts
*)ChartFX1->GetExtension(WideString("CfxFE.Financial"));
TBDailyTrade->Close();
TBDailyTrade->SQL->Clear();
TBDailyTrade->SQL->Add("SELECT * FROM tb_daily_trade_pse");
TBDailyTrade->SQL->Add("where IssueID= 369 and (extract(YEAR from
TradedDte)>=1999)" );
TBDailyTrade->Open();
if(TBDailyTrade->FieldByName("issueid")->IsNull)
{
ShowMessage("Data is not available for the IssueID you selected");
return;
}
ChartFX1->OpenDataEx(COD_VALUES,5,COD_UNKNOWN);
ChartFX1->OpenDataEx(COD_XVALUES,5,COD_UNKNOWN);
int x=0;
do
{
try
{
ChartFX1->ValueEx[0][x] =
TBDailyTrade->FieldByName("Low")->AsFloat;
ChartFX1->ValueEx[1][x] =
TBDailyTrade->FieldByName("Open")->AsFloat;
ChartFX1->ValueEx[2][x] =
TBDailyTrade->FieldByName("Close")->AsFloat;
ChartFX1->ValueEx[3][x] =
TBDailyTrade->FieldByName("High")->AsFloat;
ChartFX1->ValueEx[4][x]=TBDailyTrade->FieldByName("TotalVolume")->AsFloat;
ChartFX1->XValueEx[0][x]=TBDailyTrade->FieldByName("TradedDte")->AsFloat;
}
catch(...)
{
;
}
TBDailyTrade->Next();
x++;
}
while(!TBDailyTrade->Eof);
ChartFX1->CloseData(COD_VALUES);
ChartFX1->CloseData(COD_XVALUES);
FinExt->PricesAxis->set_Format(AF_NUMBER);
void __fastcall TForm1::ChartFX1ChangeType(TObject *Sender, short nIndex,
void *nRes_which_is_really_a_Ptr_to_short)
{
if(FinExt->CurrentGallery==CHART_POINTANDFIGURE)
{
FinExt->PointAndFigure->BoxSize = 5;
FinExt->PointAndFigure->ReversalAmount = 2;
FinExt->PointAndFigure->PercentualBox = true;
FinExt->PointAndFigure->PenWidth = 1;
}
else if(FinExt->CurrentGallery==CHART_KAGI)
{
ShowMessage("KAGI");
FinExt->Kagi->YinWidth=3;
FinExt->Kagi->YangWidth = 1;
FinExt->Kagi->ReversalAmount = 2;
}