Need Help in Trade Entry

 
Can anyone help me on this one with the programming ? I have an ea that would go into a BUY trade if the blue and red lines touches at the meeting point (crossing point) of the Stochastic Oscillator when it goes below 20. I want to fine tune the entry coding of the ea so that the EA would only enters the Buy trade at the meeting point ONLY the blue line is BELOW the red line prior to the 2 lines touches. Vice-visa for the Sell entry. Thanks for any help.
Reason: