One more in the series of a simple-to-do code examples in MetaTrader 5 (the main loop of this one has 6 lines of code).
This is a MACD that can use average for input price instead of using "pure" price. That can help in filtering some false signals, but the main purpose of this code is to show how simple some things can be done using MetaTrader 5. In addition to all usual options when it comes to this type of indicators, option to have color changes based on MACD slope change or MACD crossing signal line.
A very well known RSI of average is made with, all in all, 3 lines of a code in a main loop (color assignment on RSI slope change included in those 4 lines). This one can be used as template for some other indicator and can provide a simplicity solution for those that think that everything is very complicated in MetaTrader 5.Stochastic of T3
This version of Stochastic Oscillator reduces the number of false alerts by smoothing the price prior to be used in the stochastic calculation. That makes a nice smooth stochastic as a result that can easily be used for trend trading systems.
The Schaff Trend Cycle (STC) indicator detects up and down trends long before the MACD. It does this by using the same Exponential Moving Averages (EMAs), but adds a cycle component to factor currency cycle trends. Since currency cycle trends move based on a certain amount of days, this is factored into the equation of the STC indicator to give more accuracy and reliability than the MACD.ErrorDesc
Printing GetLastError() and MqlTradeResult retcode as text description.