PureBytes Links
Trading Reference Links
|
I have converted TS4 to run on Win2000 and NTFS and now find that the ELA
below does not write the file. Any ideas?
INPUTS:
DATAPATH("C:\data\D\"),
DECIMALS(1);
VARS:
XFILE(" "),
date1(0),
str_Text(" ");
IF CURRENTBAR = 1 THEN
BEGIN
IF DATACOMPRESSION =0 THEN XFILE =
DATAPATH +NUMTOSTR(BARINTERVAL,0)+LEFTSTR(GETSYMBOLNAME,5)+".CSV";
{"Date","Time","Close"}
IF DATACOMPRESSION =1 THEN XFILE =
DATAPATH+LEFTSTR(GETSYMBOLNAME,5)+NUMTOSTR(BARINTERVAL,0)+".CSV";
{"Date","Time","Open","High","Low","Close"}
IF DATACOMPRESSION =2 THEN XFILE =
DATAPATH+ "D"+LEFTSTR(GETSYMBOLNAME,5)+".CSV";
IF DATACOMPRESSION =3 THEN XFILE =
DATAPATH + "W"+LEFTSTR(GETSYMBOLNAME,5)+".CSV";
{"Date","Open","High","Low","Close"}
IF DATACOMPRESSION =4 THEN XFILE =
DATAPATH +"M"+LEFTSTR(GETSYMBOLNAME,5)+".CSV";
{"Date","Open","High","Low","Close"}
FILEDELETE(XFILE);
END;
date1=(Year(date)+1900);
FILEAPPEND(XFILE,NUMTOSTR(date1,0));
str_Text = RightStr(NumToStr(Date,0), 4);
FILEAPPEND(XFILE,str_Text);
FILEAPPEND(XFILE,", ");
IF DATACOMPRESSION < 2 THEN
BEGiN
FILEAPPEND(XFILE,NUMTOSTR(TIME,0));
FILEAPPEND(XFILE,", ");
END;
IF DATACOMPRESSION >0 THEN
BEGiN
FILEAPPEND(XFILE, NUMTOSTR(OPEN,DECIMALS));
FILEAPPEND(XFILE,", ");
FILEAPPEND(XFILE,NUMTOSTR(HIGH,DECIMALS));
FILEAPPEND(XFILE,", ");
FILEAPPEND(XFILE,NUMTOSTR(LOW,DECIMALS));
FILEAPPEND(XFILE,", ");
FILEAPPEND(XFILE,NUMTOSTR(CLOSE,DECIMALS));
FILEAPPEND(XFILE,", ");
END;
FILEAPPEND(XFILE,NUMTOSTR(VOLUME,0) + NEWLINE);
IF CONDITION22 THEN PLOT1(C,"");
|