解决方案 »

  1.   

    Type
      TTDXDayInfo = packed record
        nDate                     : integer;  //日期,     格式:yyyymmdd的整数 如20080101 20081229
        nStartPrice               : integer;  //开盘价格, 格式:开盘价*100,取整
        nMaxPrice                 : integer;  //最高价,   格式:~~
        nMinPrice                 : integer;  //最低价,   格式:~~
        nEndPrice                 : integer;  //收盘价,   格式:~~
        nAmount                   : Single;   //成交总额,元
        nCount                    : integer;  //总量,手
        M                         : integer;  //保留 暂为分析出来,猜测是平均价格
      end;
    这是我很多年前分析的,现在已经不用这个了,因为这个是未复权的,得自己分析GBBQ来进行复权,将很麻烦
      

  2.   

    成交额我用的是SINGLE,提取出来没有问题。
    请参考我的VBA代码,最后一个字段不知道含义Type MyType
        a2 As Long '日期
        a3 As Long '开盘价
        a4 As Long '最高价
        a5 As Long '最低价
        a6 As Long '收盘价
        a7 As Single '成交金额
        a8 As Long '成交量
        a9 As Long '?
    End TypeSub 按钮1_Click()Dim File2 As Integer
    Dim b As MyTypeFile1 = FreeFile
    Open "sz399002.day" For Binary Access Read As #File1
    i = 2Do While Not EOF(File1)
        Get #File1, , b
        'Cells(i, 1) = b.a1
        Cells(i, 2) = b.a2
        Cells(i, 3) = b.a3
        Cells(i, 4) = b.a4
        Cells(i, 5) = b.a5
        Cells(i, 6) = b.a6
        Cells(i, 7) = b.a7
        Cells(i, 8) = b.a8
        Cells(i, 9) = b.a9    i = i + 1
    LoopClose #File1End Sub
      

  3.   

    @goethe 你好!你的代码我试过,数据不大对,下面是sh000001的最近三天数据
    20150304 326418 328659 325048 327953 3.4679E+11 293639522 15205163
    20150305 326408 326664 322167 324848 3.7358E+11 320663585 37421525
    20150306 324804 326693 323453 324119 3.28344E+11 282915791 41681296
    0 0 0 0 0 0 0 0尝试了几种别的结构也不行,不知道day文件的具体格式是什么?