MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 A B C D E F G H I J K L M N O P R S T U V W Y Z #

Volatility Breakout System

In "Designing Volatility Breakout Systems," Paolo Pezzutti sets intraday entry
and exit conditions. Intraday signals can only be tested using MetaStock Professional.
The following system test replicates the TradeStation signals given in the article.

To create a system test in MetaStock, select System Tester from the Tools menu, click New,
and enter the following formula:

Volatility Breakout System

Enter Long

new:=ROC(DayOfWeek(),1,\$)<>0;
r:=ValueWhen(1,new,Ref(HighestSince(1,new,H)-LowestSince(1,new,L),-1));
count:=Cum(If(new,Ref(C,-1),0));
ma:=count-ValueWhen(13,new,Ref(count,-1));
ValueWhen(1,new,Ref(C,-1))<ValueWhen(2,new,Ref(C,-1)) AND
ValueWhen(1,new,Ref(C,-1))>ma AND
C>=ValueWhen(1,new,Ref(C+(0.5*r),-1))

Close Long

new:=ROC(DayOfWeek(),1,\$)<>0;
r:=ValueWhen(1,new,Ref(HighestSince(1,new,H)-LowestSince(1,new,L),-1));
count:=Cum(If(new,Ref(C,-1),0));
ma:=count-ValueWhen(13,new,Ref(count,-1));
bc:=ValueWhen(1,new,Ref(C,-1))<ValueWhen(2,new,Ref(C,-1)) AND
ValueWhen(1,new,Ref(C,-1))>ma AND
C>=ValueWhen(1,new,Ref(C+(0.5*r),-1));
H>=ValueWhen(1,bc,ValueWhen(1,new,Ref(HighestSince(1,new,H),-1)))

Enter Short

new:=ROC(DayOfWeek(),1,\$)<>0;
r:=ValueWhen(1,new,Ref(HighestSince(1,new,H)-LowestSince(1,new,L),-1));
count:=Cum(If(new,Ref(C,-1),0));
ma:=count-ValueWhen(13,new,Ref(count,-1));
ValueWhen(1,new,Ref(C,-1))>ValueWhen(2,new,Ref(C,-1)) AND
ValueWhen(1,new,Ref(C,-1))<ma AND
C>=ValueWhen(1,new,Ref(C-(0.5*r),-1))

Close Short

new:=ROC(DayOfWeek(),1,\$)<>0;
r:=ValueWhen(1,new,Ref(HighestSince(1,new,H)-LowestSince(1,new,L),-1));
count:=Cum(If(new,Ref(C,-1),0));
ma:=count-ValueWhen(13,new,Ref(count,-1));
sc:=ValueWhen(1,new,Ref(C,-1))>ValueWhen(2,new,Ref(C,-1)) AND
ValueWhen(1,new,Ref(C,-1))<ma AND
C>=ValueWhen(1,new,Ref(C-(0.5*r),-1));
L<=ValueWhen(1,sc,ValueWhen(1,new,Ref(LowestSince(1,new,L),-1)))

--William Golson
Equis International
www.equis.com
Source / From: TOP