Download MetaTrader 5

Setup EA to wait during certain market conditions

To add comments, please log in or register
Enable MQL5 Storage to store your source codes. It is free!
Mustafa AYDINOL 2016.10.01 21:21 

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.

Biantoro Kunarto
Biantoro Kunarto 2016.10.03 10:31  

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

To add comments, please log in or register