The following code in metastock, i need same in amibroker, please help ...
Moving Average - Shift'ed Bands - Plot
V1:=Input("Mov periods",2,500,200);
V2:=Input("% shift",0,50,.1);
A1:=Mov(C,V1,E);
A2:=A1+(A1*(V2/100));
A3:=A1-(A1*(V2/100));
A1;
A2;
A3
Moving Average - Shift'ed Bands - Alerts
V1:=Input("Mov periods",2,500,200);
V2:=Input("% shift",0,50,.1);
A1:=Mov(C,V1,E);
A2:=A1+(A1*(V2/100)); {Top band}
A3:=A1-(A1*(V2/100)); {Bottom band}
Alert(C=A2 OR Cross(A2,C),1); {Top band contact OR crossing}
-Alert(C=A3 OR Cross(C,A3),1); {Bottom band contact OR crossing, minus sign in front makes it easier to see plot}
Moving Average - Shift'ed Bands - Plot
V1:=Input("Mov periods",2,500,200);
V2:=Input("% shift",0,50,.1);
A1:=Mov(C,V1,E);
A2:=A1+(A1*(V2/100));
A3:=A1-(A1*(V2/100));
A1;
A2;
A3
Moving Average - Shift'ed Bands - Alerts
V1:=Input("Mov periods",2,500,200);
V2:=Input("% shift",0,50,.1);
A1:=Mov(C,V1,E);
A2:=A1+(A1*(V2/100)); {Top band}
A3:=A1-(A1*(V2/100)); {Bottom band}
Alert(C=A2 OR Cross(A2,C),1); {Top band contact OR crossing}
-Alert(C=A3 OR Cross(C,A3),1); {Bottom band contact OR crossing, minus sign in front makes it easier to see plot}