Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

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

author EAcpu | 5 reads | 0 comments |

TrendLinearReg - indicator for MetaTrader 5

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:

TrendLinearReg - indicator for MetaTrader 5

Figure 1. TrendLinearReg indicator


Attachment download

📎 trendlinearreg.mq5 (8.73 KB)

Source: MQL5 #1884

Verification code Refresh