Trend Oscillator - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources - MetaTrader 5 Resources

Original author:
Yevgeny Gutorov
Trend Oscillator. The main algorithm for obtaining the source signal uses the following formula:
InputSeries[bar] = (Closing price [bar] - Opening price [bar]) / (Highest price [bar] - Lowest price [bar])
To calculate the oscillator signal generated by the green line, we use the following formula:
Osc=Sum(period) / Sum(Abs(period)) * 100
The red line is the Hodrick-Prescott filter, which is redrawn if the redraw period in the start bar is long. Therefore, it is better to use a period of 2 to obtain more reliable results.
This indicator was originally written in MQL4 and first published in the code base on August 15, 2009.

Figure 1 geTrendOsc trend oscillator
Attachment download
📎 getrendosc.mq5 (9.73 KB)
Source: MQL5 #12521
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •