3 EMA
-
Greetings,
I would like to create an Expert Advisor for Metatrader 5, and I am stuck. There are 3 Exponential Moving Averages, all of which must be operating under the timeframe of 1 Day (Daily) across all currencies that only I have opened. The rules are simple, when the 50 EMA crosses under the100 EMA and under the 200EMA, then the 100 EMA crosses under 200 EMA yet is under the 50 EMA you sell; you buy if it is in the opposite direction. However, the verification that the moving averages has crossed is identified based on the opening price; if the price dropped, which made the moving average cross, that is not a buy opportunity, because there is a chance it will go back up (the position must be opened based on the opening price, when the opening price is opened, and you see that the moving average has crossed, then you open the position). Take profit of 100 pips, if it didn't get 100 pips, and the market changes direction, then close the opened position when all the moving average crosses the other way (based on the above rules), and open another position based on the crossing of the moving averages (same rules as far as take profit and loss).
-
@ramimoujaes No problem. Do you have a project to begin with?
-
Unfortunately no.
-
@ramimoujaes that million-word sentence is a bit difficult to follow, but I think this is close to what you need:
https://fxdreema.com/shared/WsOlW0N7e -
This was helpful thank you
-
@roar greetings,
This is what I am having trouble with. I am having trouble opening a buy position EVERYTIME the 50 EMA crosses the 200 EMA upward; and to close the position EVERYTIME the 50 EMA crosses the 200 EMA downward, and vice versa. Below, you can see what I have.

-
@ramimoujaes Then you need to remove block 1.
-
@l-andorrà thats it?
-
@ramimoujaes Unless there is another issue within the blocks (and that I don't know), yes, that should be all.