分筆數(shù)據(jù)時(shí)間為何不正確? [金字塔]
- 咨詢內(nèi)容:
PCALCINFO stData = {0};
char ppChar[64];
strftime( ppChar, sizeof(ppChar), " %Y-%m-%d %X" , localtime(&stData.m_pSubsection[i].m_time) );
strText2.Format("分筆數(shù)據(jù),時(shí)間:%s",ppChar);
分筆數(shù)據(jù)時(shí)間為何不正確?
- 金字塔客服:
你地代碼貼的不全,此外你也把不全的分筆數(shù)據(jù)的日志貼過來我們看看
- 用戶回復(fù):
void CMainWindowDlg::OnButton1Gedata() { //讀取上海市場(chǎng)的600000日線數(shù)據(jù)范例 PCALCINFO stData = {0}; stData.m_dataType = TICK_DATA ; //MIN1_DATA ; //DAY_DATA;//日線 stData.m_bIsPow = 1; //是否復(fù)權(quán) stData.m_wMarket = 'HS'; strcpy(stData.m_szLabel,"600030"); //讀取600000 浦發(fā)銀行數(shù)據(jù) char dest[20]={0}; const char format[]="%A, %B %d %Y. The time is %X"; if(g_pMainFormework->GetDataInfo(&stData)) { CString strText,strText2,strTextAll; GetDlgItemText(IDC_EDIT_INFO, strTextAll);
char ppChar[64]; for(int i = 0; i < stData.m_nNumSubData; i++) { strftime( ppChar, sizeof(ppChar), " %Y-%m-%d %X" , localtime(&stData.m_pSubsection[i].m_time) ); strText2.Format("分筆數(shù)據(jù),時(shí)間:%s",&ppChar); strText.Format("分筆數(shù)據(jù),m_fNewPrice:%f,m_fVolume:%f,m_fAmount:%f",stData.m_pSubsection[i].m_fNewPrice, stData.m_pSubsection[i].m_fVolume,stData.m_pSubsection[i].m_fAmount);
strTextAll += ":::" + strText2 + ";;;" + strText + "\r\n"; }
strText.Format("共取到%d個(gè)數(shù)據(jù)",stData.m_nNumData); strTextAll += strText + "\r\n"; SetDlgItemText(IDC_EDIT_INFO, strTextAll); }
- 網(wǎng)友回復(fù):
以下運(yùn)行的結(jié)果:除了時(shí)間不對(duì),價(jià)格,成交量,好像都不對(duì)。
:::分筆數(shù)據(jù),時(shí)間: 2004-08-19 09:18:56;;;分筆數(shù)據(jù),m_fNewPrice:0.000000,m_fVolume:341131392.000000,m_fAmount:0.000000:::分筆數(shù)據(jù),時(shí)間: 2004-08-19 09:18:56;;;分筆數(shù)據(jù),m_fNewPrice:10.260000,m_fVolume:0.000000,m_fAmount:333776.000000:::分筆數(shù)據(jù),時(shí)間: 1972-04-11 16:11:46;;;分筆數(shù)據(jù),m_fNewPrice:-0.000000,m_fVolume:10.260000,m_fAmount:10.250000:::分筆數(shù)據(jù),時(shí)間: 2008-08-13 23:18:24;;;分筆數(shù)據(jù),m_fNewPrice:341205792.000000,m_fVolume:-0.000000,m_fAmount:10.250000:::分筆數(shù)據(jù),時(shí)間: 2004-08-19 12:13:42;;;分筆數(shù)據(jù),m_fNewPrice:0.000000,m_fVolume:341219200.000000,m_fAmount:0.000000:::分筆數(shù)據(jù),時(shí)間: 2004-08-19 09:18:56;;;分筆數(shù)據(jù),m_fNewPrice:10.260000,m_fVolume:0.000000,m_fAmount:333813.000000共取到1001個(gè)數(shù)據(jù)
- 網(wǎng)友回復(fù):
/* time_t在金字塔的定義是32位,對(duì)于使用VS2005等高版本Visual C++,time_t是64位,直接使用將導(dǎo)致數(shù)據(jù)結(jié)構(gòu)紊亂
請(qǐng)?jiān)趕tdafx.h文件里加上如下這個(gè)定義即可。#define _USE_32BIT_TIME_T */
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容