Turtle Soup code confirmation

spartacus1

Newbie
Messages
1
Likes
0
Spartacus1 here...long time reader, first time poster:
below is the code for LBR's Turtle Soup...well I hope it is...would someone
with nothing better to do like to check it out and critique it please...
thanks


INPUT:LENGTH(20),PREV(4),ENTRYADD(10 POINTS);

VAR:HH(0),LL(0),NEWH(999),NEWL(999),Z(0),LEN(0),CDAYS(0),MP(0),
TSSELL(0),TSBUY(99999),LGO(FALSE),SGO(FALSE),
REBUY(99999),REBUYLIFE(0),RESELL(0),RESELLLIFE(0);
ARRAY:HI[40](0),LO[40](99999);


MP=MARKETPOSITION;
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;
LGO=TRUE;
SGO=TRUE;
REBUYLIFE=REBUYLIFE-1;
RESELLLIFE=RESELLLIFE-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 H>=TSBUY[1] THEN BEGIN
TSBUY=99999;
REBUY=TSBUY[1];
REBUYLIFE=2;
END;
IF (H>=REBUY[1] AND MP[1]=0) OR REBUYLIFE<=0 THEN BEGIN
REBUY=99999;
REBUYLIFE=0;
END;
IF REBUYLIFE>0 AND MP=0 AND MP[1]=0 THEN Buy("TS-ReBuy") Next Bar REBUY STOP;
IF L<=TSSELL[1] THEN BEGIN
TSSELL=0;
RESELL=TSSELL[1];
RESELLLIFE=2;
END;
IF (L<=RESELL[1] AND MP[1]=0) OR RESELLLIFE<=0 THEN BEGIN
RESELL=0;
RESELLLIFE=0;
END;
IF RESELLLIFE>0 AND MP=0 AND MP[1]=0 THEN Sell Short("TS-ReSell") Next Bar RESELL STOP;

IF CDAYS>LEN THEN BEGIN
IF HH>0 AND NEWH>=PREV AND IDHIGH>HH AND SGO THEN BEGIN
TSSELL=HH-ENTRYADD;
Sell Short("TS-Sell") Next Bar TSSELL STOP;
SGO=FALSE;
END;
IF LL>0 AND NEWL>=PREV AND IDLOW<LL AND LGO THEN BEGIN
TSBUY=LL+ENTRYADD;
Buy("TS-Buy") Next Bar TSBUY STOP;
LGO=FALSE;
END;
END;
END;

Sell("Initial LX") Next Bar IDLOW STOP;
Buy to Cover("Initial SX") Next Bar IDHIGH STOP;
 
I have no idea about your code but I would point out that the Turtle Soup system was published in 1995 and was a method for fading the trading of the Turtles who were thought to buy at 20 day highs and sell at 20 day lows. There is almost certainly no trend follower doing that anymore. However, that in itself doesn't mean it won't work.

Good luck,

Tom.
 
Top