No trade when candle body pips from 20EMA > ATR14
-
Hi All,
Struggling to create the conditions so that my EA will NOT open a buy or sell trade whenever the candle body in pips from the EMA20 line are greater than 1 X ATR14. Can anyone help?
Thanks!
-
@sirboyce Sorry...ignore the candle body bit...should be if on Candle1 close no trade if pip movement away from EMA20 greater than 1 X ATR14
-
I'm a bit confused, sorry. Can you please specify the required conditions?
-
@l-andorrà So, in this example; the bear candle length below the (red) EMA20 is 16 pips, and the ATR value at this candle close is 0.0752...which converts to 7.5 pips (if my understanding is correct). In this instance, I would want the EA to NOT take a sell trade.

IF the ATR value at this time was, say, up at 0.1736 (17 pips)...I would want the EA to open the sell trade.
In other words, if pips above (for a buy) or below (for a sell) the EMA20 are less than ATR pips at candle close...OPEN TRADE. If pips above (for a buy) or below (for a sell) the EMA20 are greater than the ATR pips at candle close...NO TRADE OPEN.
Hope this makes sense!
-
Now I understand. These blocks need to be added before your byt/sell now blocks:

-
@l-andorrà Thanks, That looks just what I need, but I don't see a 'Check distance for buys or sells' option in fxDreema. These are all that appear:

Please advise.
-
@sirboyce Sorry. Ignore. I see it is the Check Distance block (I guess you somehow renamed it in your example for clarity?)
-
@l-andorrà Hmmm...I tried the buy condition but I don't think this is really what I am looking to do. I can't see anything in that block that is checking Candle ID1 total pip movement after close and then determining that the total pips is below the equivalent ATR pips
-
@sirboyce said in No trade when candle body pips from 20EMA > ATR14:
@sirboyce Sorry. Ignore. I see it is the Check Distance block (I guess you somehow renamed it in your example for clarity?)
Exactly.
-
@sirboyce said in No trade when candle body pips from 20EMA > ATR14:
@l-andorrà Hmmm...I tried the buy condition but I don't think this is really what I am looking to do. I can't see anything in that block that is checking Candle ID1 total pip movement after close and then determining that the total pips is below the equivalent ATR pips
You will need a variable to stor that information and then compare it with your up and down limits. Not everything can be done with a single block, unfortunately.
