久久综合丝袜日本网手机版,日韩欧美中文字幕在线三区,亚洲精品国产品国语在线,极品在线观看视频婷婷

      • 通達信股票軟件日線數(shù)據(jù)分析

        時間:2022-07-10 19:17:46 計算機軟件 我要投稿
        • 相關(guān)推薦

        通達信股票軟件日線數(shù)據(jù)分析

        通達信股票軟件日線數(shù)據(jù)分析
        2007-11-29 12:06:10 / 個人分類:技術(shù)

        日線文件以"代號"+"股票代碼"+".day"命名,代號為"sh"或"sz",股票代碼6位,一個記錄32個字節(jié)。
        以深發(fā)展1997年1月2日的數(shù)據(jù)為例:
        00000000h: 36 B8 30 01 72 06 00 00 86 06 00 00 60 06 00 00 ;
        00000010h: 72 06 00 00 77 69 D4 4C 68 FE 66 00 74 06 00 00 ;
        以下是分解
        00000000h:|36 B8 30 01|72 06 00 00|86 06 00 00|60 06 00 00|;
        [36 B8 30 01] = 0x0130B836 = 19970102 日期[unsigned long]
        [72 06 00 00] = 0x00000672 = 1650/100 = 16.50 開盤[unsigned long]
        [86 06 00 00] = 0x00000686 = 1670/100 = 16.70 最高[unsigned long]
        [60 06 00 00] = 0x00000660 = 1632/100 = 16.32 最低[unsigned long]
        00000010h:|72 06 00 00|77 69 D4 4C|68 FE 66 00|74 06 00 00|;
        [72 06 00 00] = 0x00000672 = 1650/100 = 16.50 收盤[unsigned long]
        [77 69 D4 4C] = 0x4CD46977 = 111365048.0 成交額[float]
        [68 FE 66 00] = 0x0066FE68 = 6749800 成交量[unsigned long]
        [74 06 00 00] = 0x00000674 = 1652/100 = 16.52 上日收盤[unsigned long](保留)

        #include
        #include
        #include
        using namespace std;

        struct TDSData_Day
        {
        unsigned long date; //日期
        unsigned long open; //開盤價,單位:分
        unsigned long high; //最高價,單位:分
        unsigned long low; //最低價,單位:分
        unsigned long close; //收盤價,單位:分
        float amount; //交易金額,單位:元
        unsigned long vol; //成交量,單位:股
        int reserv; //保留,有時用來保存上一交易日收盤價
        };

        void showData(TDSData_Day data)
        {
        cout << "日 期:" << data.date << endl;
        cout << "開盤價:" << setw(8) << setprecision(2) << data.open / 100.0 << " 元 ";
        cout << "最高價:" << setw(8) << data.high / 100.0 << " 元 ";
        cout << "最低價:" << setw(8) << data.low / 100.0 << " 元 ";
        cout << "收盤價:" << setw(8) << data.close / 100.0 << " 元 " <cout << "成交額:" << setw(12) << fixed << setprecision(0) << data.amount << " 元" <cout << "成交量:" << setw(12) << data.vol << " 股" <cout << "昨收盤:" << setw(8) << setprecision(2) << data.reserv/100.0 << " 元" <}

        int main()
        {
        TDSData_Day myIn;
        cout << "文件讀出測試" << endl;

        ifstream fin;
        const char* fname = "D:\new_dgzq\Vipdoc\sz\lday\sz000001.day";
        fname ="sz000001.day";
        fin.open(fname,ios::binary | ios::in);
        for(int i = 0; i < 5; i++)
        {
        fin.read(reinterpret_cast(&myIn), sizeof(TDSData_Day));
        showData(myIn);
        }
        fin.close();
        fname ="sz000002.day";
        fin.open(fname,ios::binary | ios::in);
        for(int i = 0; i < 5; i++)
        {
        fin.read(reinterpret_cast(&myIn), sizeof(TDSData_Day));
        showData(myIn);
        }
        fin.close();

        cout << "Done!";
        return 0;
        }

        【通達信股票軟件日線數(shù)據(jù)分析】相關(guān)文章:

        銷售數(shù)據(jù)的分析方法07-25

        數(shù)據(jù)分析報告07-28

        大數(shù)據(jù)分析07-20

        大數(shù)據(jù)分析07-25

        多維數(shù)據(jù)分析方法04-07

        數(shù)據(jù)分析簡歷模板02-17

        數(shù)據(jù)分析工作職責(zé)07-28

        數(shù)據(jù)分析常用方法07-26

        數(shù)據(jù)分析主管的職責(zé)01-13

        數(shù)據(jù)分析報告【推薦】03-07