Topic: how to code an ea to signal that the stochastic is crossing the macd

http://s4.postimage.org/pO3fA.jpg


how to code an ea to signal that the stochastic is crossing the macd lines, indicated the white circle?