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

 

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

Reason: