Creating EA to buy when price crosses below Bollinger Band
-
Hi all,
I want to build an EA that simply buys when price crosses a lower bollinger band. I thought this would0_1488304481374_Chip_Buy.mq4 be pretty straight forward. Here is my file.
But when I run it ion MT4, it is missing lots of opportunities which match the condition.
Any help, much appreciated.
Jon
-
can you create shared link to your strategy?
-
@Drchip The "crosses above" and "crosses below" are subjected to gaps in data (in case you were testing it in backtester). You could try to run it on "ticks" rather than "control points". Also, they don't work so well if you choose Candle ID 0 (you may use greater than (>) or less than (<) instead).
Don't forget to check if your Candle ID's matches your entry idea (for the candle cross and the bollinger band in the condition blocks).
-
I don't know if something is wrong with the project, but I see "Digits count" on the left side of that Condition block. Digits count is a number such as 4 or 5 and it can't be compared with a price value (that comes from the bollinger bands).
Here is more information about the crossover in Condition block: https://fxdreema.com/help/working-with/crossover
-
Hi all,
Many thanks for your responses here. I've had a look over the advice but unfortunately I'm still struggling a bit. See the two pictures below. When I test the program in MT4 it picks up one of the instances when price moves below the Bollinger Bands but not the other instances and I have no idea why!
I've put a screen shot in of the code also.
Wondering if this has anything to do with testing at H4 timeframe?
Any help much appreciated.
Thanks
Chip


-
This way of connecting blocks (under "on Tick") should produce multiple buy trades, not just one. Why do you get only 1 trade?
You don't actually need that "Once per tick" block. Note that this block is a filter, not a driver. This block does not make the following blocks to run once per tick. Well, this is exactly what will happen if you have it under "on Tick", but for other reason. The way this block works is very similar to the way "OR" block works.
I don't know why don't get multiple trades, but block "No trade" is most probably needed at the top.
What do you want to happen? Because I don't really understand, something is missing for me...