|
Can senior members please translate for me the following from MetaStock language to the AFL ? I want to have the enter & exit arrows also. Thank you. vgakkhar WriteIf(F1:=ValueWhen(1,H<Ref(H,-2) AND Ref(H,-1)<Ref(H,-2) AND Ref(H,-3)<Ref(H,-2) AND Ref(H,-4)<Ref(H,-2),Ref(H,-2));F2:=ValueWhen(1,L>Ref(L,-2) AND Ref(L,-1)>Ref(L,-2) AND Ref(L,-3)>Ref(L,-2) AND Ref(L,-4)>Ref(L,-2),Ref(L,-2));a:=Cross(H,F1);b:=Cross(F2,L); state:=If(BarsSince(a)<BarsSince(b),1,0); state>Ref(state,-1),"If trading short positions, exit all short positions today with a Market On Close (MOC) order or at the market price on tomorrow's open. If trading long positions, enter long today with a Market On Close (MOC) order or at the market price on tomorrow's open. ")\ \ WriteIf(F1:=ValueWhen(1,H<Ref(H,-2) AND Ref(H,-1)<Ref(H,-2) AND Ref(H,-3)<Ref(H,-2) AND Ref(H,-4)<Ref(H,-2),Ref(H,-2));F2:=ValueWhen(1,L>Ref(L,-2) AND Ref(L,-1)>Ref(L,-2) AND Ref(L,-3)>Ref(L,-2) AND Ref(L,-4)>Ref(L,-2),Ref(L,-2));a:=Cross(H,F1);b:=Cross(F2,L); state:=If(BarsSince(a)<BarsSince(b),1,0); state<Ref(state,-1),"If trading long positions, exit all long positions today with a Market On Close (MOC) order or at the market price on tomorrow's open. If trading short positions, enter short today with a Market On Close (MOC) order or at the market price on tomorrow's open. ")\ \ WriteIf(F1:=ValueWhen(1,H<Ref(H,-2) AND Ref(H,-1)<Ref(H,-2) AND Ref(H,-3)<Ref(H,-2) AND Ref(H,-4)<Ref(H,-2),Ref(H,-2));F2:=ValueWhen(1,L>Ref(L,-2) AND Ref(L,-1)>Ref(L,-2) AND Ref(L,-3)>Ref(L,-2) AND Ref(L,-4)>Ref(L,-2),Ref(L,-2));a:=Cross(H,F1);b:=Cross(F2,L); state:=If(BarsSince(a)<BarsSince(b),1,0); state=Ref(state,-1),"No trading signals today.") |
- [amibroker] MetaStock language to AFL Vinay Gakkhar.
- [amibroker] MetaStock language to AFL Vinay Gakkhar.
- Re: [amibroker] MetaStock language to AFL Mubashar Virk
- [amibroker] MetaStock language to AFL Vinay Gakkhar.
- [amibroker] MetaStock language to AFL Vinay Gakkhar
- [amibroker] MetaStock language to AFL Vinay Gakkhar.
