Loop vs No Loop - RSI Divergence Need help
-
Hi everyone,
Currently working on an EA that has for objective to find RSI divergence pattern (with the rules I have defined).
As you can see below, I tried to use a loop to have an easier life when I want to add more condition on the EA, but the loop is not working properly and I cannot find why. When I am using the EA with loop, I am getting correct setup, but not all of them. For example, I tested on the 4H GU from 01/01/2023 to 31/08/2023 - I have getting 8 trades with loop and 35 without loop. The 8 trades are correct.
I think it might be an issue with variable/reset variable. But after spending a lot of time on it, I cannot figure out the issue. Please let me know if you know what is wrong in my code.
Loop: https://fxdreema.com/shared/34R9ymiwe
No-Loop: https://fxdreema.com/shared/EEY7IK2feI can share the mq5 file if needed.
Thank you
Romain -
Anyone?
@l-andorrà @roar It seems that you are the FxDreema master - have you any thoughts on the issue. It would be greatly appreciated.
-
@romainchtr you got the right idea with that loop. I think you just need some additional conditions to get better quality divergences out of the loop. Maybe a rule to terminate the loop in some cases.
Can you show a picture of some divergence the EA is not recognizing, its easier to help with an example case.
-
@romainchtr i think the problem is the "once per bar" block placed at the top. Try to move that block just above "sell now" blocks.
-
@roar @ambrogio I found the issue, and it's the Bull Candle block. If I am using a condition block (close > open), I found all the same trade than the No_Loop EA.
Link: https://fxdreema.com/shared/Pc1SornSdNot sure if it's a bug or the logic of the block cannot work with Loop.
Thank you for the help, really appricate ! -
