Setup EA to wait during certain market conditions

 
Hi,

I've recently started using fxdreema and I'm a newbie. I looked at many answers but couldn't find an answer to my question.

Is there a way to setup EA to wait and to trade in certain conditions?

Example: I want my EA to buy when cande close is above the 200 EMA but wait and not open any position if a certain indicator falls for 4 candles. I don't know if this is a stupid question but I just couldn't figure it out.

Thanks 
 

Yes you can, so the signal will be :

Buy if :    1. Close price is above EMA 200

              2. EMA 200 value of current candle > previous candle > previous candle-1 > previous candle-2

Reason: