gbbq和gbbq.map貌似经过加密,不知道有朋友知道如何取得其资料不?本人用来每天盘后自己做下数据分析,可以付现金。
有兴趣的朋友mail to:[email protected],中[email protected]好久没来过csdn了,顺便散下分,呵呵

解决方案 »

  1.   

    以前在博客园看到过类似的文章,是讲通达信数据格式的,转发一下,看看对你有没有帮助:本月将发布有关通达信日线和分时图数据格式的文章将放在个人的金融学文章板块,请有关关注这方面的朋友届时注意 
    目前进度:已分布分时图数据格式在http://www.cnblogs.com/same/articles/722400.html,这里公布两种代码VB6 和VB2005 作用一样
    ①VB6   
    Public tempdata() As Long
    Public NumBase(5) As Long '基数
    Public NumUnit(4) As Long '每单位对应的16进制数
    Public NumUnitPrice(4) As Long '每单位对于的10进制数,已被从元为单位扩大1000倍
    Public Type tempFSTrecord '每一条记录的长度为26字节:
        FSTtime As Integer
        price As Long
        avgPrice As Long
        changor As Integer
        unUse0 As Integer
        unUse1 As Long
        unUse2 As Long
        unUse3 As Long
    End Type
    Function LoadFSTdata(ByVal filename As String, fst() As FSTrecord) '240个分记录,26个字节一个记录,6508字节一天
        Dim ifile As Integer, i As Integer, j As Integer
        Dim TFR As tempFSTrecord
        Dim fileP As Long
        Dim lenDayFST As Long: longDayFST = 6508
        Dim lenminuteFST As Long: lenminuteFST = 26
        ifile = FreeFile
        Open filename For Binary As ifile
        'LoadFSTdata = (LOF(ifile) - 8) / 26 - 10
        LoadFSTdata = LOF(ifile) / 6508    ReDim fst(1 To LoadFSTdata, 239)
        ReDim tempdata(1 To LoadFSTdata)
        ReDim tempMidprice(1 To LoadFSTdata)
        ReDim fstMaxPrice(1 To LoadFSTdata)
        For j = 1 To LoadFSTdata
            Get ifile, 1 + (j - 1) * longDayFST, tempdata(j)
            Get ifile, 5 + (j - 1) * longDayFST, tempMidprice(j)
            fstMaxPrice(j) = 0
            For i = 0 To 239
                fileP = (j - 1) * longDayFST + i * lenminuteFST + 8 + 1
                Get ifile, fileP, TFR
                fst(j, i).FSTtime = TFR.FSTtime + 1 'fst(i).FSTtime = TimeSerial(0, TFR.FSTtime + 1, 0)
                fst(j, i).price = TFR.price
                fst(j, i).avgPrice = TFR.avgPrice
                fst(j, i).changor = TFR.changor
                If Abs(TFR.price - tempMidprice(j)) > fstMaxPrice(j) Then
                       fstMaxPrice(j) = Abs(TFR.price - tempMidprice(j))
                End If
            Next i
        Next j
        Close ifile
    End FunctionFunction getRealPrice(formerPrice As Long) As Long  '注意移植此函数是要把公共变量NumBase预NumUnit移动移植
     Dim i As Integer
        For i = 1 To 4                                 '该函数可返回32元人民币以下对于的准确价格
           If formerPrice < NumBase(i) Then
              getRealPrice = (Val((formerPrice - NumBase(i - 1)) & "000") / NumUnit(i - 1)) + NumUnitPrice(i - 1)
              Exit For                                  ' & 000 相当于 * 1000,以‰为单位
           End If
        Next i
    End Function
    Public Sub main()
        NumBase(0) = 1065353216: NumBase(1) = 1082130432: NumBase(2) = 1090519040: NumBase(3) = 1098907648: NumBase(4) = 1109655552 ': NumBase(5) = 1118830592
        NumUnit(0) = 4194304: NumUnit(1) = 2097152: NumUnit(2) = 1048576: NumUnit(3) = 524288 ': NumUnit(4) = 262144
        NumUnitPrice(0) = 0: NumUnitPrice(1) = 4000: NumUnitPrice(2) = 8000: NumUnitPrice(3) = 16000 ': NumUnitPrice(4) = 32000
        readZST.Show'由这个窗体去调用以上的函数,自己写
    End Sub
      

  2.   

    谢谢楼上的兄弟,不过我要的是除权数据。在通达信的目录里有gbbq和gbbq.map2个文件,用来存储除权数据。
    不过我不知道数据结构,没办法读取
      

  3.   

    VB2005代码与通达信数据格式 
    基本声明
        Public NumBase(5) As Long '通达信格式基数
        Public NumUnit(4) As Long '每单位对应的16进制数
        Public NumUnitPrice(4) As Long '每单位对于的10进制数,已被从元为单位扩大1000倍 基本模块
        Public Sub intTDXelg()Sub intTDXelg()
            NumBase(0) = 1065353216 : NumBase(1) = 1082130432 : NumBase(2) = 1090519040 : NumBase(3) = 1098907648 : NumBase(4) = 1109655552 ': NumBase(5) = 1118830592
            NumUnit(0) = 4194304 : NumUnit(1) = 2097152 : NumUnit(2) = 1048576 : NumUnit(3) = 524288 ': NumUnit(4) = 262144
            NumUnitPrice(0) = 0 : NumUnitPrice(1) = 4000 : NumUnitPrice(2) = 8000 : NumUnitPrice(3) = 16000 ': NumUnitPrice(4) = 32000
        End Sub在form load 事件中调用intTDXelg
        Public Structure stockDayRecordStructure stockDayRecord '保存一门股票的日数据信息
            Dim stockdate As Date
            Dim openor As Single
            Dim hightor As Single
            Dim lowor As Single
            Dim endor As Single
            Dim changor As Integer
            Dim id As Integer
            Dim VbP As Integer
        End Structure    Public Function getRealPrice()Function getRealPrice(ByVal formerPrice As Long) As Long  '注意移植此函数是要把公共变量NumBase预NumUnit移动移植
            Dim i As Integer
            For i = 1 To 4                                 '该函数可返回32元人民币以下对于的准确价格
                If formerPrice < NumBase(i) Then
                    getRealPrice = (Val((formerPrice - NumBase(i - 1)) & "000") / NumUnit(i - 1)) + NumUnitPrice(i - 1)
                    Exit For                                  ' & 000 相当于 * 1000,以‰为单位
                End If
            Next i
        End Function读取模块
    Function LoadDayData()Function LoadDayData(ByVal filename As String, ByRef dr() As stockDayRecord, ByVal t As Short) As Long
     '股票读取接口,第一个参数为装载股票数据的结构体
            Dim fs As FileStream = File.OpenRead(filename)
            Dim br As New BinaryReader(fs)
            Dim n As Integer
            Dim i As Integer, j As Integer
            Select Case t
                Case 1 '中天
                  Case 2 '通达信 暂时不用
                    n = (fs.Length - 4) / 32
                    LoadDayData = n
                    ReDim dr(n)
                    br.ReadInt32() '文件头到底是什么,另外是头天顺序颠放到了某个地方
                    For i = 1 To n
                        Dim d As Integer = br.ReadInt32()
                        dr(i).stockdate = DateSerial(d / 10000, (d Mod 10000) / 100, d Mod 100)
                        dr(i).openor = getRealPrice(br.ReadInt32) / 1000
                        dr(i).hightor = getRealPrice(br.ReadInt32) / 1000
                        dr(i).lowor = getRealPrice(br.ReadInt32) / 1000
                        dr(i).endor = getRealPrice(br.ReadInt32) / 1000
                        br.ReadInt32()
                        dr(i).changor = br.ReadInt32
                        dr(i).id = i
                        If (dr(i).hightor <> dr(i).lowor) Then dr(i).VbP = dr(i).changor / ((dr(i).hightor - dr(i).lowor) * 1000)
                        br.ReadInt32()
                    Next
            End Select
            fs.Dispose()
            LoadDayData = j
        End Function
      

  4.   

    大智慧老改财务数据的一些结构,可能是因为创业板,最近1年似乎就改了2次了现在代码表的起始地址,上海的为0x89024e,深圳的为0x66364e
      

  5.   


    --------------------------------------------------------------------
    股指期货要开了,大智慧又改了,上海的起始地址改回了0x66364e大智慧又有了新文件 stkinfo070.dat 不知道干什么用的,可能是新格式,要取代stkinfo060。
    不知道没事每天瞎改什么,现在不是好好的吗