Please help me code this MFi

Can you help coding this:

buy when MFI(14)<=20 and stochk crosses up over stochd

sell when MFI(14) >= 80 and stochk crosses down over stochd

As per the above condition of Money Flow Index and Stochastic

Buy Script:

MFI(14)<=20 AND SOPK(9, 3, 9, SIMPLE) >  SOPD(9, 3, 9, SIMPLE) 

Sell Script:

MFI(14)>=80 AND SOPK(9, 3, 9, SIMPLE) <  SOPD(9, 3, 9, SIMPLE)