Check this article:
https://www.mql5.com/en/articles/270

3 Methods of Indicators Acceleration by the Example of the Linear Regression
- 2011.08.04
- Andrew
- www.mql5.com
The article deals with the methods of indicators computational algorithms optimization. Everyone will find a method that suits his/her needs best. Three methods are described here.One of them is quite simple, the next one requires solid knowledge of Math and the last one requires some wit. Indicators or MetaTrader5 terminal design features are used to realize most of the described methods. The methods are quite universal and can be used not only for acceleration of the linear regression calculation, but also for many other indicators.
good! I'll study it! Thank you!

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
This is part of the code I downloaded from MT5 indicator code base. Link is here.
I understand linear regression from this wiki page. If pos = 1 and period = 14, how the Res is calculated? Which formula does the LRMA() use?
Can you explain the above code? My challenge is to understand the mathematical foundation of the above code.
Thanks!