Linear Regression Line is a straight line that best fits the prices between a starting price point and an ending price point.
The indicator has two channel modes
1) Max Distance
The distance between Linear Regression Line and Linear Regression channel,
equals to the value of maximum close price Distance from the regression line.
2)Standard deviations
Default value is one Standard deviations from central line.
Data Filter version.
If the price is, beyond the default standard deviation, price is set to standard deviation.
if Price >Mid Line + STD*Multiplier then
Price = Mid Line + STD*Multiplier
elseif Price < Mid Line - STD*Multiplier then
Price = Mid Line - STD*Multiplier
end
Complex version, can be found here.
http://fxcodebase.com/code/viewtopic.php?f=17&t=548&start=0&hilit=Linear+Regression