另外我需要的csv文件格式生成格式语句如下:
int start()
{
int handle, bars=Bars;
int ca=Time[0]-Time[1];
string sy=Symbol( );
string fn=StringConcatenate(sy,ca,".csv");
handle=FileOpen(fn,FILE_CSV|FILE_WRITE,",");
if(handle>0)
{
for(int i=bars-1; i>-1; i--)
FileWrite(handle,sy, StringConcatenate(TimeDay(Time),"/",TimeMonth(Time),"/",TimeYear(Time)),TimeToStr(Time,TIME_MINUTES), Open, High, Low, Close, Volume);
FileClose(handle);
}
return(0);
}
即数据大致如下
USDJPY,7/2/2006,12:00,117.91,118.08,117.78,117.86,1712
USDJPY,7/2/2006,16:00,117.87,118.14,117.78,118.05,1531
USDJPY,7/2/2006,20:00,118.07,118.18,117.69,117.75,1213
USDJPY,8/2/2006,00:00,117.74,118.11,117.54,118.06,1505
USDJPY,8/2/2006,04:00,118.07,118.13,117.62,117.66,1388
USDJPY,8/2/2006,08:00,117.68,118.37,117.67,118.23,1788
USDJPY,8/2/2006,12:00,118.24,118.47,118.2,118.36,1642
USDJPY,8/2/2006,16:00,118.37,118.78,118.29,118.7,888
请问wfy05先生,如果添加进去?
[ 本帖最后由 冰雪寒香 于 2006-2-10 11:05 编辑 ]