StatTrader corrected my calculation error in previous post.
But like I wrote earlier, it doesn't come out to a very large number of calculation (for a computer!). An optimized algo will save you some time machine, but by the time you find and implement it, it's not worth it. Performance...