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

[EquisMetaStock Group] Re: Pip detector code



PureBytes Links

Trading Reference Links


Hi Wallace,

Adding that 0 may fix it.....  The problem is that, if computers were
completely accurate, even the * 1.001 was not required.  Now it
depends on how they treat a number, does 1 + 1 = 1.99999 (in which
case * 1.0001 would do the trick) or does 1 + 1 = 2.00001 (in which
case you need to use * 0.99999).  So you need to test the formula
quite a bit and for a variety of stuff to get it to work in all cases.  

This I certainly haven't done nor do I intend to do it, since the
formula as it is, is good enough I think for most cases.  You can also
revisit the formula, use stuff like MS's floor and ceil and round, and
try to get something that will calculate and compensate for the
rounding and will work in all cases.  Or, you can do something like

if value < 0.0001 then pip = 0.0001
else if value < 0.001 then pip = 0.001
else if value < 0.01 then pip = 0.01
...

which is crude I guess but works .... <tonk>

Regards
MG Ferreira
TsaTsa EOD Programmer and trading model builder
http://www.ferra4models.com
http://fun.ferra4models.com



--- In equismetastock@xxxxxxxxxxxxxxx, murusprimus <no_reply@xxxx> wrote:
> 
> 
> Missing 0 in code:*1.0001 NOT *1.001
> 
> rr:=Abs(C-Ref(C,-1));
> ss:=Log(Lowest((rr=0)+rr)*1.0001)/2.302585;
> Exp((Int(ss)-1)*2.302585)
> 
> Wallace.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/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/