how to write coding for 2 close bar above indicator line?

 

Hi, anyone know how to write ea

trade base after the 2 close bar higher than EMA line.

pls help.