SparkyFlary

Linear Regression Slope Histogram

SparkyFlary Mis à jour   
This is the slope of linear regression plotted as a histogram. It has a threshold for the slope in case there is a minimum slope amount that the user wants for it to show green or red. The color shows a dim and bright effect depending on the direction of the slope to better show its rise and fall. You can set the length of the slope in the input setting screen.

Some interesting things about linear regression slope that I found out: It kind of looks like the histogram of ADX or the directional movement lines depending on the length used for the slope. According to Tushar Chande, linear regression can be used as an alternative of finding trend direction, although it is hard to say what length to use for it, I haven't been able to figure out a good way to apply it yet. According to Bulkowski, linear regression of the volume can be used with certain chart patterns that he listed to increase their chance of success by taking trades where the linear regression line points towards, so if you use volume as a source on this indicator you can take trades in whatever said direction. Got any other ideas on how to use linear regression? Feel free to let me knows, would gladly appreciate it.
Notes de version:
Apparently the slope formula that a lot of people are using that I got off of on here might be wrong. It didn't match the results of what other platforms were showing. Instead of just simply finding rise over run, I think it might be better to just grab the slope portion of the linear regression equation and use that as the slope itself. I took from here alexgrover's linear regression formula and just did that. I think it's likely more accurate than trying to conjure up a made up rise over run that I was doing.

Re-ordered the color code

Tip: you can put in any source in and not just price. You can put in volume, RSI, or whatever indicator that is on display to find their slopes.
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?