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

Re: [EquisMetaStock Group] indicator...Division by zero



PureBytes Links

Trading Reference Links

Colin,

Better than that, just send me your computer and software and I will 
put it in for you!

Okay so maybe that wouldn't work for you but how about I teach you 
where to get loads of information?

Go to the group link section and look at all the links there. You 
will find some that start with the word formula. There is one in 
particular that we have all come to rely on and I'm going to save 
you the trouble of looking it up. Here is the link:

http://trader.online.pl/MSZ/!-MSZ-index-en.html

When you get there you will find alphabetical letters across the 
top. Just click on the "S" and you will be taken to a page with 
loads of stochastic formulas.

Hope this hepls,

Preston

 

--- In equismetastock@xxxxxxxxxxxxxxx, "Colin" <colin103@xxx> wrote:
>
> Hi Preston,
> Thanks so much of your attention and help. It certainly so much to 
learn
> and hope you could advise me coding to put in the  signal line for 
the written code( Stochastic ).
> Thanks again for your help.
> Regards
> Colin
>   ----- Original Message ----- 
>   From: pumrysh 
>   To: equismetastock@xxxxxxxxxxxxxxx 
>   Sent: Thursday, August 23, 2007 1:02 AM
>   Subject: Re: [EquisMetaStock Group] indicator...Division by zero
> 
> 
>   Colin,
> 
>   Lionel makes some excellent points here.
> 
>   In looking at your formula I see some things that are very 
confusing.
>   Look at this line:
>   Mov((Mov((((CLOSE-LLV(L,Per1))/(HHV(H,Per1)-LLV(L,Per1)))
>   *100),Per2,S)),Per3,S)
> 
>   The second moving average argument has 4 "(" after it. One is 
>   usually enough. Lionel's statement about a seperate calculation 
is 
>   most appropriate here! By doing this you can eliminate the extra 
use 
>   of "( )" and save yourself some confusion in the process.
> 
>   Let me also address another potential problem...the division by 
zero 
>   error.
> 
>   Yesterday the question was asked about the problem and the 
solution 
>   was to use a MAX argument to solve the problem. I tried your 
formula 
>   and did not get the error. If you are getting the error then I 
would 
>   guess that it is coming from a stray parenthesis mark that is in 
the 
>   wrong place...again this supports Lionel's suggestion.
> 
>   Lets rewrite your formula and use:
> 
>   Numerator/Max(Denominator,.0000001)
> 
>   to see if we can remove your errors. We will also clean up the 
>   formula a bit to see if we can eliminate any confusion. Like 
this:
> 
>   Per1:=Input("length of stoch",1,100,14);
>   Per2:=Input("length of ma1",1,100,3);
>   Per3:=Input("length of ma2",1,100,3);
>   Numer:=Close - LLV(Low,per1);
>   Denom:=HHV(High,per1) - LLV(Low,per1);
>   Sto:=(Numer/Max(Denom,.0000001))*100;
>   Mov(Mov(Sto,Per2,S),Per3,S);{end}
> 
>   See if that doesn't solve your problem.
> 
>   Hope this helps,
> 
>   Preston
> 
> 
>   --- In equismetastock@xxxxxxxxxxxxxxx, "Lionel Issen" <lissen@> 
>   wrote:
>   >
>   > Try calculating the divisor separately Like this
>   > 
>   > D=(HHV(H,Per1)-LLV(L,Per1)))*100),Per2,S)),Per3,S)
>   > 
>   > And put in a requirement that D is greater than some small 
number.
>   > 
>   > 
>   > 
>   > Another problem is that Metastock uses single precision 
>   arithmetic. This
>   > means that your calculations will be inherently inaccurate as 
you 
>   are
>   > dealing with small differences of large numbers. Try a simpler 
>   indicator or
>   > do it in Excel.
>   > 
>   > 
>   > 
>   > Metastock's very weak excuse is that they do this to save disk 
>   space. This
>   > may have been true in the past, but with multi gig hard drives 
>   selling for
>   > less that fifty cents a gig, this argument is specious.
>   > 
>   > 
>   > 
>   > Lionel
>   > 
>   > 
>   > 
>   > 
>   > 
>   > From: equismetastock@xxxxxxxxxxxxxxx 
>   [mailto:equismetastock@xxxxxxxxxxxxxxx]
>   > On Behalf Of Colin
>   > Sent: Wednesday, August 22, 2007 8:07 AM
>   > To: equismetastock@xxxxxxxxxxxxxxx
>   > Subject: [EquisMetaStock Group] indicator
>   > 
>   > 
>   > 
>   > Hi, 
>   > Can someone help me with this indicator.Many thanks in advance.
>   > The parameter I'm using is 5,5,5 and everytime when plotted in 
the 
>   chart
>   > it prompt me ( the following math errors occurred during the 
>   calculation of
>   > slow stoch, Divivion by zero.)
>   > Slow Stochastic %D
>   > 
>   > Per1:=Input("length of stoch",1,100,14);
>   > Per2:=Input("length of ma1",1,100,3);
>   > Per3:=Input("length of ma2",1,100,3);
>   > Mov((Mov((((CLOSE-LLV(L,Per1))/(HHV(H,Per1)-LLV(L,Per1)))
>   *100),Per2,S)),Per3
>   > ,S)
>   > 
>   > Thanks for your attention.
>   > 
>   > Best regards,
>   > 
>   > Colin Chan
>   > 
>   > [Non-text portions of this message have been removed]
>   > 
>   > 
>   > 
>   > 
>   > 
>   > [Non-text portions of this message have been removed]
>   >
> 
> 
> 
>    
> 
> [Non-text portions of this message have been removed]
>




 
Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/