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

Re: [EquisMetaStock Group] RE: MACD-Momentum (MACD-Mo)



PureBytes Links

Trading Reference Links

Try this exploration:

ColumnA
-------
---8<----------------------

{ Stochastic-normalized MACD v1.0, -100~+100% }
{ +1 = Long;  -1= Short }
{ ©Copyright 2003 Jose Silva }
{ For personal use only }
{ http://users.bigpond.com/prominex/pegasus.htm }

pds:=63;  {Stochastic (cycle) lookback periods}
pds1:=12; {short EMA periods}
pds2:=26; {long EMA periods};
pds3:=21; {MACD oscillator trigger signal periods}
z:=4;     {"use: Open=1, High=2, Low=3, Close=4}

z:=If(z=1,O,If(z=2,H,If(z=3,L,C)));
x:=Mov(z,pds1,E);
y:=Mov(z,pds2,E);
ratio:=Min(x,y)/Max(x,y);
Mac:=(If(x>y,2-ratio,ratio)-1)*100;

StochMac:=(Mac-LLV(Mac,pds))
 /(HHV(Mac,pds)-LLV(Mac,pds)+.000001)*100;
trigger:=Mov(StochMac,pds3,E);
hist:=StochMac-trigger;
signals:=Cross(StochMac,trigger)
 +Cross(trigger,StochMac)*-1;

signals

---8<----------------------

Filter
------
---8<----------------------
ColA<>0
---8<----------------------


jose '-)



--- In equismetastock@xxxxxxxxxxxxxxx, Darren Liew <darrenliew@xxxx> 
wrote:
> Hi Dave,
> 
> the MACD oscillator - Schaff Trend Cycle is interesting.
> 
> do you have the metastock code in the Explorer format?
> I mean to detect the Crossover Up and the Crossover
> Down between the 2 lines.
> 
> 
> 
> Rgds,
> Darren Liew
> 
> --- Dave <dave_tolbert@xxxx> wrote:
> 
> > I didn't find MACD-Mo formula available on the web
> > but from research it is nearly similar to the Schaff
> > Trend Cycle, http://www.fx-strategy.com/a11.asp.
> > 
> >  Here's that indicator, 
> >
> http://users.bigpond.com/prominex/MetaStock/MACD-osc.txt
> > ----------------------------------------------------
> > 
> > MetaStock -> Tools -> Indicator Builder -> New
> > Copy and paste formula below.
> > 
> > 
> > ====================================
> > MACD oscillator - Schaff Trend Cycle
> > ====================================
> > ---8<---------------------------
> > 
> > { Stochastic-normalized MACD v1.0, -100~+100% }
> > { ©Copyright 2003 Jose Silva }
> > { josesilva22@xxxx }
> > 
> > pds:=Input("Stochastic (cycle) lookback
> > periods",2,252,63);
> > pds1:=Input("short EMA periods",1,252,12);
> > pds2:=Input("long EMA periods",2,2520,26);
> > pds3:=Input("MACD oscillator trigger signal
> > periods",1,252,21);
> > z:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5
> > P=6",1,6,4);
> > plot:=Input("MACD osc=1, Hist=2, trigger crossover
> > Signals=3",1,3,1);
> > 
> >
> > z:=If(z=1,O,If(z=2,H,If(z=3,L,If(z=5,V,If(z=6,P,C)))));
> > x:=Mov(z,pds1,E);
> > y:=Mov(z,pds2,E);
> > ratio:=Min(x,y)/Max(x,y);
> > Mac:=(If(x>y,2-ratio,ratio)-1)*100;
> > 
> > StochMac:=(Mac-LLV(Mac,pds))
> >  /(HHV(Mac,pds)-LLV(Mac,pds)+.000001)*100;
> > trigger:=Mov(StochMac,pds3,E);
> > hist:=StochMac-trigger;
> > signals:=Cross(StochMac,trigger)
> >  -Cross(trigger,StochMac);
> > 
> > If(plot=1,50,0);
> > If(plot=1,trigger,0);
> > If(plot=1,StochMac,If(plot=2,hist,signals))
> > 
> > ---8<---------------------------
> > 
> > 
> > http://users.bigpond.com/prominex/pegasus.htm




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

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

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

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