Empty4 is REEEEAAAALLLYY fussy about the input data format, especially the date/time stamp. If it doesn't like your format, it fails with no error message to give you a clue what's wrong.
I wrote an indicator to dump data from Tradestation (below) and had a heck of a time getting Empty4 to accept it. I finally got it to accept data with this format:
2012.07.16 15:05,78.84600,78.86500,78.84300,78.86400
I.e. YYYY.MM.DD hh:mm,open,high,low,close
You must use that exact format: "." as date separators, 2-digit month/day/hour/minute, space between date and time, etc. Massage your data into that format and then you should be able to import it with Tools -> History Center -> Import.
Here's the TS indicator I used to dump the data. It dumps the data in proper Empty4 format in the file <SymbolName>.csv in the directory you specify.
It uses the FastFileAppend() function, which if I remember right isn't a standard TS feature. It's in an add-on DLL that I've attached. Place the DLL in your <TS install dir>\Program directory.
Code: Select all
[LegacyColorValue = true];
inputs: Dir("C:\temp\TSdata\"), Decpts(5);
vars: Filename("x"), BarTime(0), DDate(0), Append(false);
Once begin
Filename = Dir & GetSymbolName & ".csv";
FileDelete(Filename);
//Condition1 = FastFileAppend(Filename,"Date,Time,Open,High,Low,Close,Volume,OpenInt" & newline);
Append = true;
end;
// Empty4 timestamp is at START of bar, TS is at END. So subtract a minute.
// Category = 12 --> FX, which ends its last bar of the day 1 minute early
DDate = Date;
If (Category = 12 and Time = SessionEndTime(1,1))
Then BarTime = Time
Else begin
BarTime = Time[1];
DDate = Date[1];
end;
If (Append)
then Condition1 = FastFileAppend(Filename, NumToStr(Year(DDate)+1900,0) & "." & RightStr(NumToStr(Month(DDate)+100,0),2) & "." & RightStr(NumToStr(DayOfMonth(DDate)+100,0),2) & " "
& RightStr(NumToStr(intportion(BarTime/100)+10000,0),2) & ":" & RightStr(NumToStr(BarTime+10000,0),2) & "," & NumToStr(Open,Decpts) & "," & NumToStr(High,Decpts) & "," & NumToStr(Low,Decpts) & "," & NumToStr(Close,Decpts)
& newline);
If LastBarOnChart then begin
Condition1 = FastFileFlush(Filename);
Append = false;
end;
You do not have the required permissions to view the files attached to this post.