Momentum EA 1-2-3-4 Periods - Time Frame 1H
-
I try to build this Momentum EA, using 4 periods 1-2-3-4 in time-frame 1H.
All 4 Momentum >100 (Positive) -> Buy
All 4 Momentum < 100 (Negative) -> SellAll 4 Momentum >100 (Positive) -> Buy
If any 1-in-4 Momentum <100 (Negative) -> Close BuyAll 4 Momentum < 100 (Negative) -> Sell
If any 1-in-4 Momentum >100 (Positive) -> Close SellHowever, when I use this EA in Metatrader, it close and open trade non-stop.
I don't know what wrong in this code.
Can anyone have experience take a look at it to see what's wrong ?Here is the link : https://fxdreema.com/shared/L5x0q8Jvc
-
I just get my code working - https://fxdreema.com/shared/qxU2kARlc
-
Normally people got the same result with only one "Close trades", and you have soo many
Which I don't understand, because they are pretty much the same, you can probably use just one. But it's important to make sure that this block does not run on the next (or even the same) tick after the trade is created. Remember that these blocks are under "on Tick", so they run on every tick. Make sure that the conditions above "Buy now" and the conditions above "Close trades" are different and have no chance to be true at the same time.