Alex
I have a favor to ask; listed below is Metastock code for a normalized MACD with Dema smoothing applied. Could you please convert this to an EFS2 script if you have the time.
I am hoping that once I have the two scripts to compare side by side that it will help me to be able to convert other scripts on my own.
Thanks
Doug
========================================
pds1:=Input("short EMA periods",1,500,12);
pds2:=Input("long EMA periods",2,500,26);
pds3:=
Input("MACD trigger signal periods",1,500,9);
x:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5 P=6",1,6,4);
plot:=Input("MACD=1, Histogram=2, trigger crossover Signals=3",1,3,1);
x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C) ))));
sht:=Mov(x,pds1,W);
lng:=Mov(x,pds2,W);
ratio:=Min(sht,lng)/Max(sht,lng);
Mac:=Dema(If(sht>lng,2-ratio,ratio)-1,2)*100;
trigger:=Mov(Mac,pds3,W);
hist:=Mac-trigger;
signals:=
Cross(Mac,trigger)+Cross(trigger,Mac)*-1;
0;
If(plot=1,trigger,0);
If(plot=3,signals,If(plot=2,hist,Mac))
I have a favor to ask; listed below is Metastock code for a normalized MACD with Dema smoothing applied. Could you please convert this to an EFS2 script if you have the time.
I am hoping that once I have the two scripts to compare side by side that it will help me to be able to convert other scripts on my own.
Thanks
Doug
========================================
pds1:=Input("short EMA periods",1,500,12);
pds2:=Input("long EMA periods",2,500,26);
pds3:=
Input("MACD trigger signal periods",1,500,9);
x:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5 P=6",1,6,4);
plot:=Input("MACD=1, Histogram=2, trigger crossover Signals=3",1,3,1);
x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C) ))));
sht:=Mov(x,pds1,W);
lng:=Mov(x,pds2,W);
ratio:=Min(sht,lng)/Max(sht,lng);
Mac:=Dema(If(sht>lng,2-ratio,ratio)-1,2)*100;
trigger:=Mov(Mac,pds3,W);
hist:=Mac-trigger;
signals:=
Cross(Mac,trigger)+Cross(trigger,Mac)*-1;
0;
If(plot=1,trigger,0);
If(plot=3,signals,If(plot=2,hist,Mac))
Comment