首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

股票日线数据读取有关问题

2013-08-01 
求助股票日线数据读取问题下面这段代码是读取大智慧股票日线数据的代码,话说钱龙的数据格式和大智慧的应该

求助股票日线数据读取问题
下面这段代码是读取大智慧股票日线数据的代码,话说钱龙的数据格式和大智慧的应该一样,但是我用它来读取钱龙的股票日线数据,各种参数明显不对。求高手指教,或者说能否把下面的代码转化为通达信数据格式,各个字段的定义不要改变,在线等待高人。
Procedure  TFormKXianMain.ReadData(Sender: Tobject);
Var I:Integer;
Var FileName:String;
Var DataFile:File;
Var DataDate: LongWord;
Var DataOpen: LongWord;
Var DataHigh: LongWord;
Var DataLow: LongWord;
Var DataClose: LongWord;
Var DataShuLiang: LongWord;
Var DataJinE: LongWord;
Var DataNoOne: LongWord;
Var DataNoTwo: LongWord;
Var DataNoThree: LongWord;
Begin
  Try
    DayCount:=0;
    FileName:=DayPathName+'\'+CurrentCode+'.day';
    If FileExists(FileName) Then
    Begin
    AssignFile(DataFile, Filename);
    Reset(DataFile,1);
    DayCount:=Round(FileSize(DataFile)/40);
    //基本数据
    SetLength(DayData,7);
    For I := Low(DayData) to High(DayData) do
       SetLength(DayData[I],DayCount);
    I:=0;
    while not Eof(DataFile) do
    Begin
        BlockRead(DataFile, DataDate, SizeOf(DataDate));
        DayData[0][I]:=Not DataDate;
        BlockRead(DataFile, DataOpen, SizeOf(DataOpen));
        DayData[1][I]:=Not DataOpen; //Open
        BlockRead(DataFile, DataClose, SizeOf(DataHigh));
        DayData[4][I]:=Not DataClose; //Close
        BlockRead(DataFile, DataHigh, SizeOf(DataLow));
        DayData[2][I]:=Not DataHigh;  //High
        BlockRead(DataFile, DataLow, SizeOf(DataClose));
        DayData[3][I]:=Not DataLow; //Low
        BlockRead(DataFile, DataJinE, SizeOf(DataShuLiang));
        DayData[5][I]:=Not DataJinE;//Jin E
        BlockRead(DataFile, DataShuLiang, SizeOf(DataJinE));
        DayData[6][I]:=Not DataShuLiang;//Shu Liang
        BlockRead(DataFile, DataNoOne, SizeOf(DataNoOne));


        BlockRead(DataFile, DataNoTwo, SizeOf(DataNoTwo));
        BlockRead(DataFile, DataNoThree, SizeOf(DataNoThree));
        I:=I+1;
    End;
    CloseFile(DataFile);
    End//数据文件存在
    Else
      MessageDlg('数据文件不存在,请重试!', mtInformation,[mbOk], 0);
  Except
    MessageDlg('文件读写错误,请重试!', mtInformation,[mbOk], 0);
  End;
End; 股票 行业数据
[解决办法]
钱龙的没读过
[解决办法]
什么叫应该一样,一般都不一样的,除非有意做成一样,否则很难一样,一般程序员会有意做成不一样的。
[解决办法]
这明显是在读取本地文件啊,本地存储格式根据程序员自己的喜好吧
[解决办法]
从通达信读嘛,其他的行情软件数据方面作得很不好
[解决办法]
先把两者的数据结构各个域罗列对照起来

热点排行