HELP! Why doesn´t my EA work? Please Explain
-
Moving average Breakout
bullish
Condition 1 - 20 Moving average over 50 Moving average ( always or no Trade)
Condition 2 - the entire Candle need to be over the 20 Moving average ( the EA should wait until it have succeeded ones then keep going to the next condition)
Condition 3 - the candle should Touch the 20 Moving average ( the EA should wait until it have succeeded ones then keep going to the next condition)
Condition 4 - Candle should Close above the closest Swing High (it looks for the swing high of the last 50 candles) this is when the EA should enter a trade.
On all the condition it should also be Another condition that says that if a candle closest Below the 50 Moving average then the EA should start over again.
And for a Bearish Entry all the conditions should be reversed.
EA
https://fxdreema.com/shared/ilwJZ1eyb
Can somebody help me see what I am doing wrong? -
Some initial hints.
- Remove all those 'OR' blocks. They are unnecessary.
- Do not use the yellow output connection of blocks 289 and 451. All blocks of buys and sells are to be connected to the orange output dot only.
- Are all those conditions supposed to happen at the exact same time? I guess not. and that's what is what the bit is trying to find now.
-
Thank @l-andorrà for the input!
Response to the input
-
Ok I will Remove the “or” blocks. but how will the EA understand that it need to start over if a candle is lower than 50 Moving average?
-
okay I will change that.

-
No the condition should not happen At the same time. The first condition should always be met If the first condition isn't met they EA should start over. But the second condition should only be met Once then in it should go to the next condition. The same with the third and the fourth condition.
How can I make that happened?
-
-
If you need conditions to be met before other condition, but not at the same time, you should use boolean variables. Each one controlling the next one.