PureBytes Links
Trading Reference Links
|
dbs:
Here's the code for Turtle Soup from the Street Smarts disk:
{ EasyLanguage Code for indicators and systems concepts
from the book by Raschke and Connors.
Programming code is written by
Richard Saidenberg
35 Tamarack Way
Pleasantville, NY 10570 -- phone 914-769-5164.
Copyright @1996 by Richard Saidenberg }
INPUT:LENGTH(20),PREV(4),ENTRYADD(10 POINTS);
VAR:HH(0),LL(0),NEWH(999),NEWL(999),Z(0),LEN(0),CDAYS(0),
TSSELL(0),TSBUY(0);
ARRAY:HI[40](0),LO[40](99999);
{==== DAILY DATA ====}
IF DATACOMPRESSION=2 THEN BEGIN
NEWH=NEWH+1;
NEWL=NEWL+1;
IF HH>0 AND NEWH>=PREV AND H>HH THEN BEGIN
TSSELL=HH-ENTRYADD;
PLOT1(TSSELL,"TS-Sell");
END;
IF LL>0 AND NEWL>=PREV AND L<LL THEN BEGIN
TSBUY=LL+ENTRYADD;
PLOT2(TSBUY,"TS-Buy");
END;
HH=HIGHEST(H,LENGTH);
LL=LOWEST(L,LENGTH);
IF H=HH THEN NEWH=0;
IF L=LL THEN NEWL=0;
END;
{==== INTRADAY DATA ====}
IF DATACOMPRESSION=1 THEN BEGIN
IF CURRENTBAR=1 THEN BEGIN
LEN=MINLIST(LENGTH,39);
IF LEN<1 THEN LEN=1;
END;
if D>D[1] then begin
for value1=LEN downto 1 begin
HI[value1]=HI[value1-1];
LO[value1]=LO[value1-1];
end;
end;
HI[0]=idhigh;
LO[0]=idlow;
IF D>D[1] THEN BEGIN
CDAYS=CDAYS+1;
NEWH=NEWH+1;
NEWL=NEWL+1;
HH=HI[LEN];LL=LO[LEN];
FOR Z=1 TO LEN-1 BEGIN
IF HI[Z]>HH THEN HH=HI[Z];
IF LO[Z]<LL THEN LL=LO[Z];
END;
IF HI[1]=HH THEN NEWH=1;
IF LO[1]=LL THEN NEWL=1;
END;
IF CDAYS>LEN THEN BEGIN
IF HH>0 AND NEWH>=PREV AND IDHIGH>HH THEN BEGIN
TSSELL=HH-ENTRYADD;
PLOT1(TSSELL,"TS-Sell");
END;
IF LL>0 AND NEWL>=PREV AND IDLOW<LL THEN BEGIN
TSBUY=LL+ENTRYADD;
PLOT2(TSBUY,"TS-Buy");
END;
END;
END;
|