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

Re: [EquisMetaStock Group] Turtle and Breakout System



PureBytes Links

Trading Reference Links



Hi Daniele,

Thanks for your effort about the formula.
I am very interested in  breakout sytems, turtle trading and  also using them in metastock wihout money management(position sizing). Just because of  this reason i purchased a   software about a year ago it is OK with daily weekly datasets  but it does not backtest intraday properly because of my data vendor, whatever :D

Here are my questions about your formula,

-for which version of metastock is it applicable?
-is this a system test formula or indicator etc?
-if it is a systest formula how can you buy several times ? (i realy didn't know if it was possible)

thx a lot in advance

Utku


 
                                                                               
 “That which hath been is what will be,
    that which is done is what will be done,
    and there is nothing new, under the sun.”



From: dasein_10 <daniele_delmonte@xxxxxxxxxxx>
To: equismetastock@xxxxxxxxxxxxxxx
Sent: Tuesday, June 23, 2009 7:33:40 PM
Subject: [EquisMetaStock Group] Turtle and Breakout System

Hi, I'm studying breakout system, I would like to know wich breakout system our community think It's better.
I'm particular interested on position sizing used in this system.

I have started to replicate the original (I hope)turtle system: I have find it really difficult for the position sizing formula.

I want to share the code, can be useful for someone

Buy on breakout 20 day ( size 33%) add 33% on breakout of (price of buy)+1N and the last 33% second buy point 1N
sell on breakout low 10 day, trailing stop 2N
(N=19 * PREVIOUS+ATR( 20))/20)
Do you think It' correct???

BUY:
buy:=H>Ref(HHV( H,20),-1) ;

sell:=L<Ref( LLV(L,10) ,-1) OR (C<(ValueWhen( 1,H>Ref(HHV( H,20),-1) ,L)-(2*Fml( "CTA_N turtle indicator")) ) ) ;

a:=Cum(buy);
b:=ValueWhen( 1,sell,a) ;
trades:=a-b;
BUY1:=If(TRADES> 0,1,0);

N1:=(ValueWhen( 1,TRADES= 1,C)+(1*Fml( "CTA_N turtle indicator")) );
Sbuy2:= (BUY1=1) AND H>N1;

CC:=Cum(SBUY2) ;
D:=ValueWhen( 1,sell,CC) ;
TRADES2:=CC- D;

BUY2:=If(TRADES2> 0,2,0);

N2:=(ValueWhen( 1,TRADES2= 1,C)+(1*Fml( "CTA_N turtle indicator")) );
Sbuy3:= (BUY2=2) AND H>N2;
EE:=Cum(SBUY3) ;
F:=ValueWhen( 1,sell,EE) ;
TRADES3:=EE- F;

BUY3:=If(TRADES3> 0,3,0);

long:=(TRADES= 1 and ref(trades,- 1)=0) OR (TRADES2=1 and ref(trades2, -1)=0) OR (TRADES3=1 and ref(trades3, -1)=0);
long
____________ ___

SELL:

L<Ref(LLV(L, 10),-1) OR (C<(ValueWhen( 1,H>Ref(HHV( H,20),-1) ,L)-(2*Fml( "CTA_N turtle indicator")) ) )

ENTRI SIZE: % of avaible Equity

buy:=H>Ref(HHV( H,20),-1) ;

sell:=L<Ref( LLV(L,10) ,-1) OR (C<(ValueWhen( 1,H>Ref(HHV( H,20),-1) ,L)-(2*Fml( "CTA_N turtle indicator")) ) ) ;

a:=Cum(buy);
b:=ValueWhen( 1,sell,a) ;
trades:=a-b;
BUY1:=If(TRADES> 0,1,0);

N1:=(ValueWhen( 1,TRADES= 1,C)+(1*Fml( "CTA_N turtle indicator")) );
Sbuy2:= (BUY1=1) AND H>N1;

CC:=Cum(SBUY2) ;
D:=ValueWhen( 1,sell,CC) ;
TRADES2:=CC- D;

BUY2:=If(TRADES2> 0,2,0);

N2:=(ValueWhen( 1,TRADES2= 1,C)+(1*Fml( "CTA_N turtle indicator")) );
Sbuy3:= (BUY2=2) AND H>N2;
EE:=Cum(SBUY3) ;
F:=ValueWhen( 1,sell,EE) ;
TRADES3:=EE- F;

BUY3:=If(TRADES3> 0,3,0);

trade:=if(BUY1= 1 and buy2=0,0.33, if( buy2=2 and buy3=0,0.5,if( buy1=1 and buy2=2 and buy3=0,0.66, if(buy3=3, 1,0))));
trade

(19 * PREVIOUS+ATR( 20))/20

BUY2:=If(TRADES2> 0,2,0);

N2:=(ValueWhen( 1,TRADES2= 1,C)+(1*Fml( "CTA_N turtle indicator")) );
Sbuy3:= (BUY2=2) AND H>N2;
EE:=Cum(SBUY3) ;
F:=ValueWhen( 1,sell,EE) ;
TRADES3:=EE- F;

BUY3:=If(TRADES3> 0,3,0);

long:=(TRADES= 1 and ref(trades,- 1)=0) OR (TRADES2=1 and ref(trades2, -1)=0) OR (TRADES3=1 and ref(trades3, -1)=0);
long

____________ ___

formula "CTA_N turtle indicator"
(19 * PREVIOUS+ATR( 20))/20




__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___