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

TStoMetastock



PureBytes Links

Trading Reference Links

Hi all
I have a request to make a Ts2000i tick output to Metastock
format.....TStoMetastock
Have been trying to alter a TS to ASCII  ELA kindly sent to this list some
time ago,but I cannot get it to verify (Most likely my inexperiene)

 Apparantly Metastock requires an input as per below, NOT SURE if the below
header line .. (MetaStock(tm) data file "AP2M")... is required or not

      MetaStock(tm) data file "AP2M"
      TICKER PER DATE TIME OPEN HIGH LOW CLOSE VOLUME O/I
      AP2M 0 04/08/2002 09:50:00 3389 3389 3389 3389 3 0
      AP2M 0 04/08/2002 09:50:01 3389 3389 3389 3389 1 0
      AP2M 0 04/08/2002 09:50:02 3389 3389 3389 3389 1 0
      AP2M 0 04/08/2002 09:50:03 3389 3389 3389 3389 1 0
      AP2M 0 04/08/2002 09:50:04 3389 3389 3389 3389 1 0
      AP2M 0 04/08/2002 09:50:05 3389 3389 3389 3389 3 0
      AP2M 0 04/08/2002 09:50:06 3389 3389 3389 3389 2 0
      AP2M 0 04/08/2002 09:50:07 3389 3389 3389 3389 1 0
      AP2M 0 04/08/2002 09:50:08 3389 3389 3389 3389 1 0
      AP2M 0 04/08/2002 09:50:09 3389 3389 3389 3389 4 0


Could someone help with  modifications to the below : TS to ASCII  so that
it sends a tick data file  to suit the above Metastock format

 Thanks sincerely

Milton Cooper


Inputs: path("E:\TS to ASCII\"),DateFr(0),DateThr(0);

Vars: ascfile("");
ascfile=path+GetSymbolName+"_1.txt";

If CurrentBar=1 Then Begin
 FileDelete(ascfile);
 FileAppend(ascfile,"SYMBOL,DATE,TIME,OPEN,HIGH,LOW,CLOSE,VOL"+NewLine);
End;
If Date>=DateFr AND (Date<=DateThr OR DateThr=0) Then Begin

FileAppend(ascfile,"+NumToStr(Symbol,0)+,"+"NumToStr(Date,0)+","+NumToStr(Ti
me,0)+","+NumToStr(Open,2)+","+NumToStr(High,2)+","+NumToStr(Low,2)+","+NumT
oStr(Close,2)+","+NumToStr(Volume,0)"+"NewLine)";
End;