[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ts2000i ascii files..



PureBytes Links

Trading Reference Links

Hi,
In TS4.0 this piece of code used to be able to create yearly h,l,c data from
daily data.  My EL skills are not up to the job of trying to see why it does
not work under TS2000i.  In TS4.0 it was run as a system, but I just can't
get any response from TS2000i.  I have added SP4b and still no change. In
addition there is another problem as well in that I use Future Source and FX
rates are given symbol codes such as FXUSJYMUL.  When I try and run this
system on these files it will not send the data to the PLData directory and
create the file, but for something like US bonds, US H0 it works just fine?

Many thanks
Ian Frost
ianfrost@xxxxxxxxxxxxxx
===============
Input: nMonths(3);

var: Copen(0),  Chigh(0), Clow(0), XFILE(" ");

XFILE = "e:\PLData\"+ GetSymbolName +"_Y.TXT";

if currentbar = 1 then begin
   Filedelete(Xfile);
   Copen = Open;
   Chigh = high;
   Clow  = low;
end else begin
   if (month(date) <> month(date[1])
       and mod(month(date)-1, nMonths) = 0) then begin
        {beginning of new month}
        Fileappend(Xfile, NumToStr(Date[1],0)
            + "  " + NumToStr(Copen,4)
            + "  " + NumToStr(Chigh,4)
     + "  " + NumToStr(Clow,4)
            + "  " + NumToStr(Close[1],4)
            + Newline);
        Copen = Open;
        Chigh = high;
        Clow = low;
    end;
    Chigh = Maxlist(Chigh, High);
    Clow  = MinList(Clow, Low);
    if (Date = LastCalcDate and Time = LastCalcTime) then begin
        Fileappend(Xfile, NumToStr(Date, 0)
            + "  " + NumToStr(Copen,4)
            + "  " + NumToStr(Chigh,4)
     + "  " + NumToStr(Clow,4)
            + "  " + NumToStr(Close,4)
            + Newline);
    end;
end;

=====================
ianfrost@xxxxxxxxxxxxxx
ian.frost@xxxxxxx
Tel 44-(0)-171-280-0399 (W)
Tel 44-(0)-181-675-9660 (H)
=====================