Linear Regression line

Avatar
  • updated

While searching the way to use a Donchian Channel, I came across with this Linear Regression indicator.
I'd appreciate if someone can tell me how I can set CP up to use the change of the colour from yellow to Green to buy and yellow to Red to sell.
I can see that I should use the Buy Colour buffer.... but I don't know how to find out the buffer number... for each colours.
thank you for your help.

linear-regression-indikator.mq4
CP2.57 LinearRegression test MT4.set

Image 5596

MT version:
Set for MT4 only
EA version:
v2.57
Symbol:
EURUSD
TimeFrame:
M5
Avatar
san takashima
Quote from Ulises Cune

Image 5599

0, 1 and 2  buffer

Image 5600

Thank you Ulises!
So kind.
openning the mq4 file or using the metaeditor kind of scares me a bit...
Now, opening the mq4 file and seeing the 3 lines you clipped above... looked simple enough, though it is beyond my understanding,,, beyond the property, specially from int start()...
Thank you!
I think I'll read on about the coding!

Avatar
Ulises Cune

Image 5599

0, 1 and 2  buffer

Image 5600