Enter a trade when price crosses a value
-
Hi everyone,
How would you create an EA to enter a sell when price drops 10 pips below daily open and buy when price goes 10 pips above daily open?
-
no trade block - condition block (candle 0 close x< or x> daily candle 0 open, adjusted to + or - 10 pips) - sell or buy block
-
@jstap thanks. That what I tried and it's not working.
Have you ever used this function before, using the "+ or - pips" in the adjust section of a condition?
-
Yes, add a share link and I'll have a look.
-
@jstap thanks so much for your help.
https://fxdreema.com/shared/XFK0Bn66
I am testing on a 1minute chart only getting 22 trades over a two year period. It's supposed to be 1 trade a week.
When I do the testing manually, I get a trade almost every week. So the EA should be taking close to 100 trades over a two year period.
Also I do not know how to say current price is above a certain level, so I use candle 1 close on a 1 minute chart.
-
You need a space in between 10 pips

-
@jstap ok thanks, tried it didn't work. I'm sure the problem is the right operand of block 24 and 25 because if I change it to crossing an EMA, it works perfectly.
Maybe I can draw a horizontal line at current weeks open +/-10 pips. and have the entry when it crosses the line? Instead of the value.
Would that work? How would you do this?
-
Ok it seems that the problem is with the weekly timeframe. I tried it using daily open as the right operand and it works. Has anyone ever used the crossing of the current week's Open value as an entry point? @fxDreema
-
I find this work better (mt4) on live not backtest
-
Ok I guess it's one of those strategies that I would have to test manually. Thanks @jstap