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

[EquisMetaStock Group] Re: 50 EMA Above/Below Ratio



PureBytes Links

Trading Reference Links

Pablo,
I tried cutting and pasting the most recent code you provided into my
indicator builder.  The specific error that I'm getting when I try
applying the indicator to a chart of GOOG (Daily) is:

"Custom Indicator Math Errors  ---
  Division by 0:  90"

I did however, using the code provided by bellamy, obtain a plot that
gave a running total of the periods spent above or below the 50 EMA
for the past 10 days.  Increasing the lookback to 100 yielded another
accurate plot.  After considering the ratio, wouldn't it be correct to
  assign to the numerator the days above (or below) and to the
denominator the total number of lookback days?  

Thanks much,
M

--- In equismetastock@xxxxxxxxxxxxxxx, Paolo <italoarg76@xxx> wrote:
>
> Dear mmbbrr79,
>               There is NOTHING wrong with the math error.
> But if you want you can AVOID the error pasting the code in the
> Explorer instead of Indicator Builder :)
> According with other member (bellamy_29m) the code can be shorter:
> 
> lookback:=100;
> EMA:=Mov(C,50,E);
> DaysAbove:=Sum(C>EMA,lookback);
> DaysBelow:=Sum(C<EMA,lookback); { C>EMA was wrong }
> Ratio:=DaysAbove/DaysBelow;
> Ratio;
> 
> Try and tell me :)
> Cheers,
>          Pablo
> 
> BELLAMY: thank U for become shorter my code ;)
>          
> m> Thanks for the reply Pablo...
> m> I tried cutting and pasting your formula into a chart and got a blank
> m> window... some charts say there's a math error... after naming the
> m> 'Ratio' variable, is a command necessary to tell the indicator to
> m> display said variable?
> m> - M
>








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/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/