PureBytes Links
Trading Reference Links
|
The attached .ela is of the following code which will create ASCII
files with either YYYYMMDD or YYMMDD format
Note: The short format is 2 character date (not three as Omega
seems to want for TS4).
Clyde
{
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Indicator: MakeASCIFile
Purpose: Create an ASCII file from SC/TS data with the format
MMDDYY,HHMM,OPEN,HIGH,LOW,CLOSE,VOL with a bar
bar interval the same as currently displayed on the
chart.
Inputs: FilDir -- a set of ASCII characters included within
quote marks which defines the full path to the
directory/folder (e.g. "C:\OMEGA\" ...) in which you
wish to save the new file.
TimeAdj -- an hourly amount (represented in 24 hour
time HHMM by which to adjust the time of data in
display before outputting to file.
PricAdj -- an amount (represented in big points and
decimal part of point -- PP.dd) by which to adjust the
PRICE amounts in data before outputting to file. This
can be used to make "back/front adjusted" sets of data
which can be combined using a text editor to provide
continuous data files.
BegDate -- first date YYYMMDD to output
EndDate -- last date YYYMMDD to output.
Year4dig -- true/false true = YYYYMMDD format
false = YYMMDD format
Caution: When entering the DIRECTORY (full path) where final
file is to be saved you MAY include a backslash \
as the final character in the FilDir input. If
you don't the system will append one.
Files are automatically named with the name in the
form SSTTYYMM.CSV
Where: SS = First 2 letters of symbol.
TT = Time interval (intraday) or the
characters DA WK MO as is proper.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
}
Inputs: FileDir(""), {Directory for file SHOULD end with \ }
{Set to blank "" for no file output }
{This file is a BAR by BAR DATA file }
TimeAdj(0.0), {Hours - decimal - to adjust time }
PricAdj(0.0), {Price - decimal - to adjust price }
BegDate(650101), {Beginning date for data output }
EndDate(1201231), {Ending date for data output }
Year4dig(false), {Set true for 4 digit year output }
{otherwise output is 2 dight year }
OutVol(True); {Flag to output/not output volume data }
Vars: SymID(""), FileID(""), AddS(""), TInt("DA"),String1(""),
DoInit(True), X(0), OutO(o), OutH(h), OutL(l), OutC(c), OutV(V),
AdjTime(IntPortion(TimeAdj*.01)+FracPortion(TimeAdj*.01)/.60);
If DoInit then begin
IF DataCompression=1 THEN
TInt=RightStr("00"+NumToStr(BarInterval,0),2);
IF DataCompression=3 THEN TInt="WK";
IF DataCompression=4 THEN TInt="MO";
SymID=LeftStr(GetSymbolName+"__",2);
If FileDir<>"" then begin
If RightStr(FileDir,1)<>"\" then AddS="\";
FileID=FileDir+AddS+SymID+ TInt
+ LeftStr(RightStr(NumToStr(date,0),6),4) + ".csv";
FileDelete(FileID);
FileAppend(FileID,"Date,Time,Open,High,Low,Close,Volume"+NewLine);
End;
DoInit=False;
If DoInit then Plot1(c,"");
End;
If FileDir<>"" and Date>=BegDate and Date<=EndDate then begin
X=Time;
If TimeAdj<>0 then begin
X=X*.01;
X=IntPortion(x)+FracPortion(x)/.60+AdjTime+.001;
X=IntPortion(x)*100+IntPortion(FracPortion(x)*60);
End;
OutO=O of Data1;
OutH=H of Data1;
OutL=L of Data1;
OutC=C of Data1;
If OutVol then OutV=V of Data1;
String1=RightStr(NumToStr(date,0),6);
If Year4Dig then begin
If date>990000 then String1="20"+String1
else String1="19"+String1;
End;
If OutVol then begin
FileAppend(FileID, String1 + "," +
NumToStr(X,0) + "," +
NumToStr(OutO+PricAdj,2) + "," +
NumToStr(OutH+PricAdj,2) + "," +
NumToStr(OutL+PricAdj,2) + "," +
NumToStr(OutC+PricAdj,2) + "," +
NumToStr(OutV,0) + NewLine) ;
End
Else begin
FileAppend(FileID, String1 + "," +
NumToStr(X,0) + "," +
NumToStr(OutO+PricAdj,2) + "," +
NumToStr(OutH+PricAdj,2) + "," +
NumToStr(OutL+PricAdj,2) + "," +
NumToStr(OutC+PricAdj,2) + NewLine) ;
End;
End;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Clyde Lee Chairman/CEO (Home of SwingMachine)
SYTECH Corporation email: <clydelee@xxxxxxx>
7910 Westglen, Suite 105 Work: (713) 783-9540
Houston, TX 77063 Fax: (713) 783-1092
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
To subscribe / unsubscribe from SwingMachine list
http://www.egroups.com/list/swingmachine/
After joining list the freeware SwingMachine program
(DOS Version) is available in the VAULT at:
http://www.egroups.com/list/swingmachine/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----- Original Message -----
From: "hpm" <anatop@xxxxxxxxxx>
To: <realtraders@xxxxxxxxxxxxxxx>; "Omega-Liste" <omega-list@xxxxxxxxxx>
Sent: Sunday, January 16, 2000 06:21
Subject: [RT] Y2K compatible ELA code for GET 7 ?
> Hi
>
> Where can I get a Y2000 compatible ela code
> to transfer date from TS 4.0 to GET 7 EOD version ?
>
> The code I am having does not work correctly with EOD daily data,
> for intra day data there is no problem.
>
> I don't know where and how to modify the code, if somebody on the
list
> could help I would be very thankful.
>
> See code below.
>
> Thanks in advance.
>
>
> hpm
> anatop@xxxxxxxxxx
>
> ----------------------------------------------------------------------
------
> ----------------------
>
> {================================HEADER==============================
>
>
> Advanced GET Intraday Data Transfer with security name in the file
name
>
> This system transfers data from a Tradestation intraday chart to a
file
> readable by the Trading Techniques' Advanced GET program.
> The system can be used with any kind of data compression.
>
> The files to which the system saves the data are styled using the
commodity
> symbol or stock name along the lines as follows:
> S&P: C:\GET6\DATA\SP7Z30.AHD
>
>
>
>
>
=================================DECLARATIONS===========================
===}
>
> INPUTS:
> DATAPATH("C:\GET7\DATA\"),
> DECIMALS(2),
> SYNTHDAT(TRUE);
>
> VARS:
> XFILE(" "),
> JD(DATETOJULIAN(210104));
>
> {================================MAIN PROGRAM
============================}
>
> IF SYNTHDAT THEN
> BEGIN
> JD = JD + 1;
> IF DAYOFWEEK(JULIANTODATE (JD)) = 0 THEN JD = JD + 1;
> IF DAYOFWEEK(JULIANTODATE (JD)) = 6 THEN JD = JD + 2;
> END;
>
> IF CURRENTBAR = 1 THEN
> BEGIN
> IF DATACOMPRESSION =0 THEN XFILE =
> DATAPATH
> +NUMTOSTR(BARINTERVAL,0)+LEFTSTR(GETSYMBOLNAME,5)+".AHD";
> IF DATACOMPRESSION =1 THEN XFILE =
>
> DATAPATH+LEFTSTR(GETSYMBOLNAME,5)+NUMTOSTR(BARINTERVAL,0)+".AHD";
> IF DATACOMPRESSION =2 THEN XFILE =
> DATAPATH+ "D"+LEFTSTR(GETSYMBOLNAME,5)+".AHD";
> IF DATACOMPRESSION =3 THEN XFILE =
> DATAPATH + "W"+LEFTSTR(GETSYMBOLNAME,5)+".AHD";
> IF DATACOMPRESSION =4 THEN XFILE =
> DATAPATH +"M"+LEFTSTR(GETSYMBOLNAME,5)+".AHD";
> FILEDELETE(XFILE);
> IF DATACOMPRESSION <2 AND SYNTHDAT = FALSE THEN
> FILEAPPEND(XFILE, "DATE TIME OPEN HIGH LOW
> CLOSE" + NEWLINE) ELSE
> FILEAPPEND(XFILE, "DATE OPEN HIGH LOW CLOSE" +
> NEWLINE);
> END;
>
>
> IF SYNTHDAT AND DATACOMPRESSION < 2 THEN
> FILEAPPEND(XFILE,NUMTOSTR(JULIANTODATE(JD),0))
> ELSE FILEAPPEND(XFILE,NUMTOSTR(DATE,0));
>
> FILEAPPEND(XFILE," ");
> IF DATACOMPRESSION < 2 AND SYNTHDAT = FALSE THEN
> BEGIN
> FILEAPPEND(XFILE,NUMTOSTR(TIME,0));
> FILEAPPEND(XFILE," ");
> END;
>
> 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) + NEWLINE);
>
> PLOT1(C,"");
>
>
>
>
>
>
>
Attachment Converted: "f:\eudora\attach\makeasci.ela"
|