Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Linear Regression Channel with Trend Identifier for Amibroker (AFL)

Rating:
3 / 5 (Votes 13)
Tags:
amibroker, trendlines

I modified the original Linear Regression code so that the line will change color based on the degree of the Linear Regression slope. I combine this with my trading system. When my system gives an entry signal I look at the Linear Regression Line and I will only take long positions if the Linear Regression line is green and the entry price is below the LR line. When my system gives an entry signal I look at the Linear Regression Line and I will only take short positions if the Linear Regression line is red and the entry price is above the LR line. It is usefull for filtering out lower probability trades.

Screenshots

Similar Indicators / Formulas

Advanced Trendline based on Candle Pivots
Submitted by kaiji over 9 years ago
TD Clone points and trendlines
Submitted by dogma over 9 years ago
Advanced Trend Lines
Submitted by asdaf1 over 9 years ago
Advanced Trendlines
Submitted by rajankamboj over 9 years ago
Slow Stochastic and Trendlines
Submitted by udayit almost 9 years ago
Square of Nine Roadmap Charts
Submitted by kaiji over 9 years ago
You cannot view the code for the following reasons:
  • You must be a member.

15 comments

1. babe@WST

Thank You,Very Nice Indicator

2. mahesh.aranake

Excellent

3. rock4mayo

Thank you

but how to change bar chart to candlestick

regards

4. Wysiwyg

YOU” didn’t modify the code! I added the simple colour change plot at Aussie Stock Forums on the 27th. May 2010. So pulleeeze, don’t claim “YOU” modified the code.

signed Wysiwyg.

p.s. I have “never” claimed “anyones” code as my work.

5. cyberman

I am not after recognition of any sort, if I was I would not have mentioned the original coder of the linear regression line and I would have changed the entire layout of the code like some people do to claim it as their own.

If you have a look at line 005 you will see that it is blank. I was meant to write “//Wysiwyg coded the angle in degrees part.” and I actually thought I had pasted it in there and it was only until now that you mentioned it that I realised I forgot to put it in.

The idea to change it however is mine and the way I describe how to use it I got from no one.

I have asked he admins to edit it.

6. cyberman

rock4mayo – To use candle sticks instead of bars simply change line 019 from

Plot( C, “Close”, colorWhite, styleBar, Zorder = 1);

to

Plot( C, “Close”, colorWhite, styleCandle, Zorder = 1);

7. halfman

I got error.

Error 29
Variable ‘x’ used without having been initialized.

8. Pascal SAMSON

Hi guys,
This indicator is one of the most important, and I understand why we may argue about who wrote the code, or who modified it.
All I can say is that we are happy to have this indicator, and I thank you all.

Regards,

9. nsetraderonline

CAN ANY ONE WRITE "VALUE "OF REGRSION LINE WHETHER IT IS RED OR OUT THE VALUE TO “EXP0LRARTION” SCAN OF I KNOW IT IS SIMPLE OR PLS WRITE ONLY THE CODE OF FOR EXPLORATION THIS WILL MAKE THIS AFL MORE BEATUIFUL AS ONCE CAN USE JUST CHKING THE DATABASE

10. xavier

Thumbs up

11. MASS

thanks

12. prasadmuni

A MUST FOR EVERY DAY TRADER AND THANKS A BILLION TO THE AUTHOR AND ALSO WISE STOCK TRADER.THANKS ONCE AGAIN.

13. brall

Great indicator!

Anyone has an idea how to change the code so that it draws the lines continuously: I mean if I have choosen the period equal to 150 I would like it to draw the channel for the last 150 periods, then for the previous 150 periods, and so on.

14. nyoman.ardana

Thanks for sharing

15. manoj2012

Hi Good AFL

But I was just wondering if Polynomial regression can be used in place of linear regression

Leave Comment

Please login here to leave a comment.

Back