Here's the last version...quick hack job. I'm sure it can be improved, but this is a rough sketch, code wise. The strategy works in range bound enviroments, so cointegrated pairs like AUDCAD will shine with it. Cheers, Ivan Labrie Time at Mode FX