Can anybody convert this metastock formula to amibroker afl

velmont86

Active Member
#1
ADX Rising Exploration for Metastock
{Col A:}
ADX(14)

{Filter}
ADX(14)>20 AND
ADX(14)>Ref(ADX(14),-1) AND
Ref(ADX(14),-1)>Ref(ADX(14),-2) AND
Ref(ADX(14),-2)>Ref(ADX(14),-3) AND
+DI()>Ref(+DI(),-1) AND
Ref(+DI(),-1)>Ref(+DI(),-2) AND
Ref(+DI(),-2)>Ref(+DI(),-3) AND
V>100000
 

johnnypareek

Well-Known Member
#2
ADX Rising Exploration for Metastock
{Col A:}
ADX(14)

{Filter}
ADX(14)>20 AND
ADX(14)>Ref(ADX(14),-1) AND
Ref(ADX(14),-1)>Ref(ADX(14),-2) AND
Ref(ADX(14),-2)>Ref(ADX(14),-3) AND
+DI()>Ref(+DI(),-1) AND
Ref(+DI(),-1)>Ref(+DI(),-2) AND
Ref(+DI(),-2)>Ref(+DI(),-3) AND
V>100000

Guess It will help.
HTML:
z=ADX(14);
x=PDI(14);
trend=z>20 AND z>Ref(z,-1) AND Ref(z,-1)>Ref(z,-2) AND Ref(z,-2)>Ref(z,-3) AND x>Ref(x,-1) AND Ref(x,-1)>Ref(x,-2) AND Ref(x,-2)>Ref(x,-3) AND V>1000001;
Filter=trend;
AddColumn( trend, "Trend", 1.2 );
 

rkkarnani

Well-Known Member
#3
ADX Rising Exploration for Metastock
{Col A:}
ADX(14)

{Filter}
ADX(14)>20 AND
ADX(14)>Ref(ADX(14),-1) AND
Ref(ADX(14),-1)>Ref(ADX(14),-2) AND
Ref(ADX(14),-2)>Ref(ADX(14),-3) AND
+DI()>Ref(+DI(),-1) AND
Ref(+DI(),-1)>Ref(+DI(),-2) AND
Ref(+DI(),-2)>Ref(+DI(),-3) AND
V>100000
What Reports does this Exploration give? What does the result indicate?
 

velmont86

Active Member
#4
{Col A:}
ADX(14)

{Filter}
ADX(14)>20 AND
ADX(14)>Ref(ADX(14),-1) AND
Ref(ADX(14),-1)>Ref(ADX(14),-2) AND
Ref(ADX(14),-2)>Ref(ADX(14),-3) AND
+DI()>Ref(+DI(),-1) AND
Ref(+DI(),-1)>Ref(+DI(),-2) AND
Ref(+DI(),-2)>Ref(+DI(),-3) AND
V>100000

Guess It will help.
HTML:
z=ADX(14);
x=PDI(14);
trend=z>20 AND z>Ref(z,-1) AND Ref(z,-1)>Ref(z,-2) AND Ref(z,-2)>Ref(z,-3) AND x>Ref(x,-1) AND Ref(x,-1)>Ref(x,-2) AND Ref(x,-2)>Ref(x,-3) AND V>1000001;
Filter=trend;
AddColumn( trend, "Trend", 1.2 );
not working johny bhai
 

KelvinHand

Well-Known Member
#6
not working johny bhai
not working {sat sun.} johny bhai [?]
Do not [Scan], use [Explore]
Code:
z=ADX(14);
x=PDI(14);
Filter=z>20 AND z>Ref(z,-1) AND Ref(z,-1)>Ref(z,-2) AND Ref(z,-2)>Ref(z,-3) AND x>Ref(x,-1) AND Ref(x,-1)>Ref(x,-2) AND Ref(x,-2)>Ref(x,-3) AND V>1000001;

SetOption("NoDefaultColumns", True );
AddTextColumn( Name(), "Ticker",1.0, colorDefault,colorDefault, 50);
AddTextColumn( FullName(), "Security",1.0, colorDefault,colorDefault,250);
AddColumn( DateTime(), "Date", formatDateTime, colorDefault,colorDefault, 80 );
AddColumn(z, "ADX");
 
Last edited:
#7
HI ..

can anybody also help me to convert this Metastock indicator to amibroker?

pds1:=Input("HHV (long) breakout periods", 1,252,21);
pds2:=Input("LLV (short) breakout periods", 1,252,10);
display:=Input("display: signals=1, in-trade binary=2",1,2,1);
x:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5 P=6",1,6,4);
delay:=Input("Entry and Exit delay",0,3,0);

x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C)))));
In:=x>Ref(HHV(x,pds1),-1);
Out:=x<Ref(LLV(x,pds2),-1);

Init:=Cum(In+Out>-1)=1;
InInit:=Cum(In)=1;
Flag:=BarsSince(Init OR In) < BarsSince(Init OR Out)+InInit;
In1:=Cum(Cum(In))=1;
Out1:=Cum(Cum(Out))=1;

If(display=1,Ref(Cum(Cum(In))=1,-delay),0);
If(display=1,-Ref(Out1 AND BarsSince(In1)>=BarsSince(Out1),-delay),0);
If(display=1,Ref((InInit AND Alert(InInit=0,2)
OR Flag AND Alert(Flag=0,2)) - (Flag=0 AND Alert(Flag,2)),-delay),Flag)
 

Similar threads