On forex there´s nothing new under the sun and what you´re rying to do was made a long time ago in fact is a standard indicator in MT4 and is called Andrew Pitchfork´s lines. By the way way very useful. The concept you must learn is: PRICE ALWAYS GO TO THE MEDIAN LINE
