Download MetaTrader 5

Indicators: TrendLinearReg

To add comments, please log in or register
MetaQuotes Software Corp.
Moderator
182381
MetaQuotes Software Corp. 2008.11.13 07:30 

TrendLinearReg:

How a trend changes? How to determine a flat? ... etc. This indicator will help to answer these questions.

Author: Watashi

Giampiero Raschetti
63
Giampiero Raschetti 2008.11.13 07:57  

Looking for flat zones, where trades are uncertain, is very important.

Simple but effective !!

Thank you

MQL4 Comments
16319
MQL4 Comments 2008.11.15 19:37  

This indicator acts much the same as EMAAngleZero. But the EmaAnglezero gives a faster response

MQL4 Comments
16319
MQL4 Comments 2008.11.16 20:24  

Thanks for sharing this interesting indicator. I will try to use it and see what am I able to develop with it. By the way, can somebody tell me where can I find info concerning the mentioned EmaAnglezero?

bobby
130
bobby 2008.11.17 14:43  

Thanks for sharing this indicator, here is the TrendLinearReg expert advisor.

keithhobbs
26
keithhobbs 2009.12.20 08:48  

how do you tell if its a flat zone?

Adam Parusel
52
Adam Parusel 2010.04.27 06:46  
Thank you for this indicator - I was going to write it on my own, but no need for that anymore :)

But one problem I encountered in the calculation: you start the loop with i = 0, but shouldn't the first value be multiplied by 1 instead? Otherwise you will always get zero as first value.
I change it to this:
   for(int i=0; i<barsToCount; i++)
   {
      sumy+=Close[i+shift];
      sumxy+=Close[i+shift]*(i+1);
      sumx+=(i+1);
      sumx2+=(i+1)*(i+1);      
   }
MQL4 Comments
16319
MQL4 Comments 2010.06.22 19:49  

This is a very effect filter with setting of 21 for the 15 minute charts! I am using it based on changes in color with couple of other indicators. It is working better for me than the colored MACD which used to be one of my favorite filters.

Thank you very much!

To add comments, please log in or register