PureBytes Links
Trading Reference Links
|
> Hurst = Log(Rng/(k * Scale)) / Log(Len);
It's always a good idea to check for zero with any input or var that can
make your calc puke. In this case, any of the 4 terms could do it. You
also can't take the log of a negative number. So.....
If Rng>0 and k>0 and Scale>0 and Len>0 then
Hurst = Log(Rng/(k * Scale)) / Log(Len);
--
Dennis
|