Indicator معادلة ترند صاعد تلقائي للميتا ستوك

ASHgaR

عضو نشط
التسجيل
12 يوليو 2006
المشاركات
775
{ User inputs }
choose:=Input("Version: [1]Basic, [2]Proflogic's Ensign",1,2,2);
pds1:=Input("Proflogic's Ensign orig: EMApds 28, SmoothPds 84",0,0,0);
pds1:=Input("EMA periods",1,252,21);
pds2:=Input("Smoothing periods",1,252,5);
pds3:=Input("Signal periods",1,252,10);
plot:=Input("[1]Ergodic, [2]Histogram, [3]Crossover Signals",1,3,1);

{ Ergodic }
x:=Mov(Mov(H-L,pds1,E),pds2,E);
x:=If(x>0,x,.000001);
ergo1:=(Mov(Mov(C-O,pds1,E),pds2,E)/x)*100;

{ Proflogic's Ensign Ergodic version:
EMA periods = 28, Smoothing periods = 84 }
ergo2:=
Mov(Mov(Mov(C-Ref(C,-1),pds1,W),pds2,W),pds1,W)
/Mov(Mov(Mov(Abs(C-Ref(C,-1)),pds1,W),pds2,W),
pds1,W)*100;

{ Selected Ergodic version }
ergodic:=If(choose=1,ergo1,ergo2);

{ Ergodic signal & histogram }
signal:=Mov(ergodic,pds3,E);
ergoPlot:=If(plot=1,ergodic,ergodic-signal);

{ Ergodic/Signal crossovers }
long:=Cross(ergodic,signal);
short:=Cross(signal,ergodic);

{ Average (zero-line) }
ergoPlotAvg:=
Cum(ergoPlot)/Cum(IsDefined(ergoPlot));

{ Auto overbought/sold boundaries }
Pk:=Ref(ergoPlot,-1)=HHV(ergoPlot,3)
AND Ref(ergoPlot,-1)>ergoPlotAvg;
PkVal:=ValueWhen(1,Pk,Ref(ergoPlot,-1));
Obought:=Cum(PkVal)/Cum(IsDefined(PkVal));
Tr:=Ref(ergoPlot,-1)=LLV(ergoPlot,3)
AND Ref(ergoPlot,-1)<ergoPlotAvg;
TrVal:=ValueWhen(1,Tr,Ref(ergoPlot,-1));
Osold:=Cum(TrVal)/Cum(IsDefined(TrVal));

{ Plot in own window }
If(plot=1,signal,If(plot=2,ergoPlotAvg,0));
If(plot=3,long-short,Obought);
If(plot=3,long-short,Osold);
If(plot=3,long-short,ergoPlot)

هذه المعادلة اعمل copy والصقها بالمكان المحدد

هديه للاخ خلك اشقردي
 
أعلى