Please code for below Stochastic Strategy
Buy for closing above 34 EMA with Stochastic % K period 20, % k slowing 3 and % D period 4 with % K Crossing % D above 30
Sell for closing below 34 EMA and Stochastic % K period 20, % k slowing 3 and % D period 4 with % D Crossing % K below 80
Buy:
CLOSE > EMA (CLOSE, 34) AND SOPK(20, 3, 4, SIMPLE) > SOPD (20, 3, 4,SIMPLE) AND REF (SOPK(20, 3, 4, SIMPLE), 1) < REF(SOPD(20, 3, 4, SIMPLE), 1) AND SOPD (20, 3, 4,SIMPLE) > 30
Sell:
CLOSE < EMA (CLOSE, 34) AND SOPK(20, 3, 4, SIMPLE) < SOPD (20, 3, 4,SIMPLE) AND REF (SOPK(20, 3, 4, SIMPLE), 1) > REF (SOPD(20, 3, 4, SIMPLE), 1) AND SOPD (20, 3, 4,SIMPLE) < 80