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

Re: [amibroker] Metastock code conversion



PureBytes Links

Trading Reference Links



fitro2155 wrote:
 

Can anyone help me convert the Metastock code below to Amibroker

Metastock Code

prd1:=Input("First period",1,300,21);
prd2:=Input("Second period",1,300,8);
prdCrs:=Input("Crossover",1,300,13);
prd2:=prd2*2-1;

Src:=Mov((C-Mov(C,30,E))/Ref(Mov(C,30,E),-30),prd1,E);

SIROC:=100-100/(1+If(Mov(If(Src-Ref(Src,-1)<0,-(Src-Ref(Src,-1)),0),prd2,E)=0,
1000000,Mov(If(Src-Ref(Src,-1)>0,Src-Ref(Src,-1),0),prd2,E)/Mov(If(Src-Ref(Src,-1)<0,-(Src-Ref(Src,-1)),.000000001),prd2,E)));

DTrigger:=Mov(SIROC,prdCrs,E);

SIROC;
DTrigger



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4537 (20091023) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


prd1 = Param ("First period",21,1,300);
prd2 = Param ("Second period",8,1,300);
prdCrs = Param ("Crossover",13,1,300);
prd2 = prd2*2-1;

Src = "">
SIROC = 100-100/(1+IIf(EMA(IIf(Src-Ref(Src,-1)<0,-(Src-Ref(Src,-1)),0),prd2)==0,
1000000,EMA(IIf(Src-Ref(Src,-1)>0,Src-Ref(Src,-1),0),prd2)/EMA(IIf(Src-Ref(Src,-1)<0,-(Src-Ref(Src,-1)),.000000001),prd2)));

DTrigger = EMA(SIROC,prdCrs);

Plot(SIROC, "", colorRed);
Plot(DTrigger, "", colorBrightGreen);


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4537 (20091023) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





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

__,_._,___