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

Re: [EquisMetaStock Group] Weekly MACD histogram



PureBytes Links

Trading Reference Links

Bill

I have this formula for "slope of line".

  {Slope of Line}
Periods:=Input("Periods",5,50,10);
Slope:=((Sum(Cum(1)*P,Periods))-
(Sum(Cum(1),Periods)*Sum(P,Periods)/Periods))/
((Sum(Power(Cum(1),2),Periods))-
(Power(Sum(Cum(1),Periods),2)/Periods));
Slope;

Here's virtually the same thing applied to a 75 period Tema of CLOSE.

  {Slope of Tema}
A:=Tema(C,75);
Pds:=10;
Slope:=((Sum(Cum(1)*A,Pds))-
(Sum(Cum(1),Pds)*Sum(A,Pds)/Pds))/
((Sum(Power(Cum(1),2),Pds))-
(Power(Sum(Cum(1),Pds),2)/Pds));
Slope;

I'm unaware or who the author is but think I picked these up from the Guppy site ages ago.

Roy

----- Original Message ----- 
From: "Bill Saxon" <vondell@xxxxxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Sunday, April 04, 2004 1:24 AM
Subject: Re: [EquisMetaStock Group] Weekly MACD histogram


Thanks Roy and Jose.   What great websites.  I pasted the formulae in and it works great.

There is a mathematical formula that gives the slope of an indicator, i.e. is a MACD line going
basically up or down?  I have seen reference to a slope of a regression line (if this is the same
thing) but nothing that could be applied to any indicator. I guess it would use a P Array
expression.

Thanks again.

Bill
  ----- Original Message ----- 
  From: Roy Larsen
  To: equismetastock@xxxxxxxxxxxxxxx
  Sent: Friday, April 02, 2004 4:06 PM
  Subject: Re: [EquisMetaStock Group] Weekly MACD histogram


  Bill

  ----- Original Message ----- 
  From: "Jose" <josesilva22@xxxxxxxxx>
  To: <equismetastock@xxxxxxxxxxxxxxx>
  Sent: Saturday, April 03, 2004 7:27 AM
  Subject: Re: [EquisMetaStock Group] Weekly MACD histogram


  >
  > Bill, just simply go here:
  > http://users.bigpond.com/prominex/pegasus.htm#roy
  >
  > Roy has gone through a lot of trouble to create accurate weekly
  > indicators for daily charts.  Forget the complexity, and just copy and
  > paste the formulae into MetaStock.
  >
  > jose '-)


  For a more basic version try this. It still uses Jose's "Calendar Week counter" for the greatest
  accuracy with any data gaps. Check it's accuracy against the canned MACD() indicator on any weekly
  periodicy chart.

  Roy

    {Weekly MACD - Close Basic}
    {© 2004 Roy Larsen, rlarsen@xxxxxxxxxxxxxx}
    {for use on daily charts with
     Jose Silva's "Calendar Week counter"}
  N:=Input("Daily MACD Signal Periods",1,19,9);
  G:=LastValue(Highest(Sum(DayOfWeek()=
     ValueWhen(2,1,DayOfWeek()),5))=5);
  J:=Fml("Calendar Week counter");
  J:=Abs(J-ValueWhen(2-G,1,J)); J:=G OR J;
  K:=ValueWhen(1,J,ValueWhen(2-G,1,C));
  X:=0.15; Y:=0.075; N:=2/(N+1);
  X:=If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-X)+K*X);
  Y:=If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-Y)+K*Y);
  R:=X-Y;
  Z:=If(Cum(J>0)=1,R,ValueWhen(1,J,PREV)*(1-N)+R*N);
  R; {MACD}
  Z; {Signal}




------------------------------------------------------------------------------
  Yahoo! Groups Links

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

    b.. To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.





 
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/