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

[amibroker] help converting metastock code to AFL



PureBytes Links

Trading Reference Links

Hello,

Can someone help me convert this metastock code into an AFL scan?  
THANKS!

The metastock code:

Column A :

Pa:=Trough(4,LOW,5);
Pb:=Peak(3,HIGH,5);
P1:=Trough(3,LOW,5);
P2:=Peak(2,HIGH,5);
P3:=Trough(2,LOW,5);
P4:=Peak(1,HIGH,5);
P5:=Trough(1,LOW,5);
tb:=TroughBars(1,LOW,5);
tb<=4 AND
p1 > pa AND
pb < p2 AND
p1 < p2 AND
p1 < p4 AND
p1 > p3 AND
p3 > p5 AND
p4 < p2 


Column B :
Tangents

p1:=Trough(3,LOW,5);
p3:=Trough(2,LOW,5);
p5:=Trough(1,LOW,5);
o1:=p1-p3;
o2:=p1-p5;
a1:=TroughBars(3,LOW,5)-TroughBars(2,LOW,5);
a2:=TroughBars(3,LOW,5)-TroughBars(1,LOW,5);
tan1:=o1/a1;
tan2:=o2/a2;
Abs(tan1-tan2)

Filter:

colA AND colB <= .2



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.19/556 - Release Date: 11/28/2006 3:22 PM