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

[amibroker] MS code conversion help please



PureBytes Links

Trading Reference Links



Can any one pleaseeee convert this MS code in to  AB.
Thanks in Advance

Performance Systems
Consolidation Breakout
Trading signals for <Name> (<Symbol>) on <Date>

WriteIf(var1:=If(((BBandTop(C,20,S,2)-BBandBot(C,20,S,2))<(1.75*ATR
(1))) AND Cross(H,BBandTop(C,20,S,2)),1,If(ATR(1) AND Cross(BBandBot
(C,20,S,2),L),-1,0));EL:=var1=1;CL:=Cross(Mov(C,20,S),L);ES:=var1=-
1;CS:=Cross(H,Mov(C,20,S));
State:=If(Cum(1)=1,0,If(EL,1,If(ES,-1,If((CL AND PREV=1) OR (CS AND 
PREV=-1),0,PREV))));
State=1 AND Ref(State,-1)<1,
"Enter long today with a Market On Close (MOC) order or at the 
market price on tomorrow's open. ")\
\
WriteIf(var1:=If(((BBandTop(C,20,S,2)-BBandBot(C,20,S,2))<(1.75*ATR
(1))) AND Cross(H,BBandTop(C,20,S,2)),1,If(ATR(1) AND Cross(BBandBot
(C,20,S,2),L),-1,0));EL:=var1=1;CL:=Cross(Mov(C,20,S),L);ES:=var1=-
1;CS:=Cross(H,Mov(C,20,S));
State:=If(Cum(1)=1,0,If(EL,1,If(ES,-1,If((CL AND PREV=1) OR (CS AND 
PREV=-1),0,PREV))));
State=-1 AND Ref(State,-1)>-1,
"Enter short today with a Market On Close (MOC) order or at the 
market price on tomorrow's open. ")\
\
WriteIf(var1:=If(((BBandTop(C,20,S,2)-BBandBot(C,20,S,2))<(1.75*ATR
(1))) AND Cross(H,BBandTop(C,20,S,2)),1,If(ATR(1) AND Cross(BBandBot
(C,20,S,2),L),-1,0));EL:=var1=1;CL:=Cross(Mov(C,20,S),L);ES:=var1=-
1;CS:=Cross(H,Mov(C,20,S));
State:=If(Cum(1)=1,0,If(EL,1,If(ES,-1,If((CL AND PREV=1) OR (CS AND 
PREV=-1),0,PREV))));
State=0 AND Ref(State,-1)=1,
"Exit long today with a Market On Close (MOC) order or at the market 
price on tomorrow's open. ")\
\
WriteIf(var1:=If(((BBandTop(C,20,S,2)-BBandBot(C,20,S,2))<(1.75*ATR
(1))) AND Cross(H,BBandTop(C,20,S,2)),1,If(ATR(1) AND Cross(BBandBot
(C,20,S,2),L),-1,0));EL:=var1=1;CL:=Cross(Mov(C,20,S),L);ES:=var1=-
1;CS:=Cross(H,Mov(C,20,S));
State:=If(Cum(1)=1,0,If(EL,1,If(ES,-1,If((CL AND PREV=1) OR (CS AND 
PREV=-1),0,PREV))));
State=0 AND Ref(State,-1)=-1,
"Exit short today with a Market On Close (MOC) order or at the 
market price on tomorrow's open. ")\
\
WriteIf(var1:=If(((BBandTop(C,20,S,2)-BBandBot(C,20,S,2))<(1.75*ATR
(1))) AND Cross(H,BBandTop(C,20,S,2)),1,If(ATR(1) AND Cross(BBandBot
(C,20,S,2),L),-1,0));EL:=var1=1;CL:=Cross(Mov(C,20,S),L);ES:=var1=-
1;CS:=Cross(H,Mov(C,20,S));
State:=If(Cum(1)=1,0,If(EL,1,If(ES,-1,If((CL AND PREV=1) OR (CS AND 
PREV=-1),0,PREV))));
State=Ref(State,-1),
"No trading signals today.") 


Regards
Selvi










------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/