Hi everyone,
I want your help to convert following Metstock function in Amibroker function:
(1) IsDefined( )
(2) BBandTop(c,15,E,3)
(3) BBandTop(c,15,S,3)
(4) PREV
In amibroker we use BBandTop(c,15,3) but how to enter simple or exponantial period.
Following is an AFL in which I want to explore Buy & Sell price for last 1 yrs of every stock:
aa=Cross(C,EMA(C,20));
bb=Cross(EMA(C,20),C);
state=IIf(BarsSince(aa)<BarsSince(bb),1,0);
state>Ref(state,-1);
Buy = state>Ref(state,-1);
Sell = state<Ref(state,-1);
Cll=IIf(Buy,C,0);
sll=IIf(Sell,C,0);
Filter=Buy ;
AddColumn(Cll,"Bvalue");
AddColumn(sll,"svalue");
But when I run explore it give "0" in sell price column.
Please guide me what changes should I do in the above afl.
Regards,
(moneypick)
I want your help to convert following Metstock function in Amibroker function:
(1) IsDefined( )
(2) BBandTop(c,15,E,3)
(3) BBandTop(c,15,S,3)
(4) PREV
In amibroker we use BBandTop(c,15,3) but how to enter simple or exponantial period.
Following is an AFL in which I want to explore Buy & Sell price for last 1 yrs of every stock:
aa=Cross(C,EMA(C,20));
bb=Cross(EMA(C,20),C);
state=IIf(BarsSince(aa)<BarsSince(bb),1,0);
state>Ref(state,-1);
Buy = state>Ref(state,-1);
Sell = state<Ref(state,-1);
Cll=IIf(Buy,C,0);
sll=IIf(Sell,C,0);
Filter=Buy ;
AddColumn(Cll,"Bvalue");
AddColumn(sll,"svalue");
But when I run explore it give "0" in sell price column.
Please guide me what changes should I do in the above afl.
Regards,
(moneypick)