Can't see if there is a mistake in my EA
-
Hi guys. So I created this EA that looks for double tops/bottoms on the 5m. https://fxdreema.com/shared/yIZV5h3xe. It draws a green line at the 60 bar highs (candle body close) and a red line at the 60 bar lows (candle body close). This seems to work fine in my forward testing, allthough sometimes I get wrong lines during the early Asian sessions.
Next I have to have a pullback beneath the 15 EMA and a retest of the line all within 60 bars. You can see them by the areas left and right from the large area in the middle that creates the lines.
To get a signal, I need a hammer candle for long and an inverted candle for short setups, that cross the line but don't close beneath/above the lines. Here is a pick of a setup that would have to trigger a long (the third pinbar through the line:

Could experienced programmers go through my EA and see if I made an error somewhere, whenever you have time? I would really appreciate it.
-
@sirluk Firstly, you can remove all those 'pass' blocks. They are not necessary. The I see you are requesting the hammer to be confirmed at the same time the trade is supposed to be open. If I understand your strategy correctly that should happen before, right? If so you need to separate that part from the current launcher.
-
No, in a buy setup, the trade should open as soon as a hammer candle formed and closed…so the hammer has to be ID 1. The lower wick of the hammer also has to go through the bottom line, but close above.
I don’t know, the Ea is running on a VPN and sometimes I come and see and the lines are incorrect, even though mostly it works. Just thought maybe someone sees a mistake I made in drawing the lines or with the following setup it needs. Thanks for looking through it!
-
@sirluk You're welcome.