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

Sergey Solujanov
Smooth unnormalized oscillator implemented as a color histogram.
How are trends changing? How to choose a building? How to trade? ...etc.
If we assume that the trend of N bars is a straight line, we can calculate the parameters of this line. The equation of the straight line is y = bx + c. Line slope is characterized by the "b" coefficient. The indicator calculates this parameter through linear regression for each bar and displays it in a separate window. Green means greater than the previous value, i.e. the angle has increased, red means the opposite.
In fact, as far as the chart is concerned, the "b" coefficient is derived from two factors - the tangent of the angle and the coefficient characterizing the currency pair, so the scale of the indicator values is different for different currency pairs.
How to use indicators? In my opinion, there are several options:

Figure 1. TrendLinearReg indicator
Attachment download
📎 trendlinearreg.mq5 (8.73 KB)
Source: MQL5 #1884
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •