stochastic oscillator

 

Hi,

    I'm trying to automate an alert on  stochastic oscillator.

I'd like to setup an alert every time the D and K line exit from the overbought and oversold area.

example:k and d line go from 19 in t-1 to 21 in t0 , or k and d go from 85 in t-1 to 78 in to 

How I'd develop this?

Waiting for your news

Regards 

 
Chek previous data of K and D,than compare with current K and D?
Reason: