Crossing Moving Average
-
Greetings,
I am trying to create/develop an expert advisor where the 50 EMA crosses the 200 EMA, then open position, and close the position when the two EMA's recross. Essentially, positions must be opened and closed at the same time. Unfortunately, it did not quite do that as per below picture:

How can I fix this problem, below you can find the shared project:
-
-
@ramimoujaes always specify candle ID1 in more settings field

Even the examples of "how to" are incorrect
-
@josecortesllobat @ambrogio Greetings,
As you can see, the position did not close when the MA re-crosses (even after modifying the ID, it did not close the position), you kindly assistance is much appreciated.

Below, you can find the link:
-
@ramimoujaes said in Crossing Moving Average:
hen open position, a
Maybe try changing from specified to any symbol under close position.
-
-
@ramimoujaes Your project has some blocks fields empty that are important for the project´s logic.
My suggestion is always to try to understand the logic of what you are building. The "How To" examples are just a guide to help you to begin from something. Same applies for the suggestions provided on the forum.
Said that, what you want is to open - close trades on opposite conditions of a MAs crossover. Here you have an approach



As you can see above,
when MA (5) x> MA (200), EA closes Sells (no sells were running, no Buy - Out) and opens Buys (Buy - In)
when MA (5) x< MA (200), EA closes Buys (Sell - Out) and opens Sells (Sell - In)As I mentioned earlier, that example is just an approach to what you want but it does not mean that is the only one because fxDreema allows to do the same through different ways.
-
@josecortesllobat Hello am Creven ,
Just know I have been looking for such an expert advisor which closes the current position and opens up a new after the recross so I am requesting we chat because I need this badly and I am ready to use it on a real account -
Hello I am Creven.
I am requesting someone to share this two moving average expert advisor which closes the current position and opens up a new position after a recross

