Read 45° angle on moving average
-
Hi I would like to build an ea that has a condition set that when the moving averages are tilted upward or downward then it only would execute the buy/sell trade. Can someone please guide me how I can go about that, using an example of a 10 day and 20 day moving average.
-
@luqmaan You can do it like this, just change settings to how you prefer: This shows how to get the MA slope, make a start and ask hoe to resolve any other problems you have.
-
Thank you so much jstap, with the link you shared, you helped me figure out how to use the slope of the macd levels (histogram bars). You helped me figure out something I have been wanting to do for a while for a bot to recognize or place trade when the macd levels are increasingly positive or increasingly negative or decreasingly positive or decreasingly negative.

The blue arrow buys represent when the macd levels are increasing in the positive direction or increasingly toward the positive direction if the direction even though the macd direction is negative measuring the difference of macd levels from the 2 previous candles, previous candle and the current candle and the buy is placed right after the close of the current candle. Vice versa for red arrow sells placed when macd levels are increasingly in downward direction or decreasing in positive direction.
https://fxdreema.com/shared/s069sHGkd