Fit a line at successive intervals, where the interval period is determined by a user-selected time frame, this allows the user to have an estimate of the intrinsic trend within various intervals.
Timeframe : Determine the period of the interval, if the timeframe is weekly then a new line will be fit at the start each weeks, by default "Daily"
Version 2 - Linear Regression Slope. This version will have more freedom on picking your own length for all the Inputs.
One of the main reason I changed it is because, Slope calculation on transition period was not being computed properly. Because the Version 1, looks back the length assigned, and compute the slope based on two candle readings, could be 10 days...
Forecasting is a blurry science that deal with lot of uncertainty. Most of the time forecasting is made with the assumption that past values can be used to forecast a time series, the accuracy of the forecast depend on the type of time series, the pre-processing applied to it, the forecast model and the parameters of the model.
In tradingview we...
Based on my latest script "Linear Channels"
This is a trailing stop version of the linear channels. Thanks to capissimo for helping me fix several issues with the linear extrapolation part.
In order to know how the indicator work i recommend reading the post on the Linear Channels indicator here
Couldn't find searching for Linearly Weighted Moving Average (LWMA) in tradingview. Found one with the LWMA title, but it uses plain WMA calculation without the linearity which more heavily weights recent price data, which I need, so I try to made one.
LWMAs are also quicker to react to price changes than SMA and EMA. If you want a moving average with less lag...
This is my first public release of indicator code and my PSv4.0 version of "Linear Regression Channel", as it is more commonly known. It replicates TV's built-in "Linear Regression" without the distraction of heavy red/blue fill bleeding into other indicators. We can't fill() line.new() at this time in Pine Script anyways. I entitled it Linear Regression Trend...
Lines are the most widely used figures in technical analysis, this is due to the linear trends that some securities posses (daily log SP500 for example), support and resistances are also responsible for the uses of lines, basically linear support and resistances are made with the assumption that the line connecting two local maximas or minimas will...
I already made an indicator (simple line) that tried to make lines on price such that the results would not repaint and give a good fit to the price, today i publish a channels indicator based on the simple line indicator. The indicator aim to show possible support and resistance levels when the central line posses a low sum of squares with the...
This is version 1 of the Linear Regression Slope. In ideal world the Linear regression slope values will remain same for any time period length. because the equation is y = mx+b, where m is the slope. All I did here is m = y/x
The Main Purpose of this indicator is to see, if the Trend is accelerating or decelerating.
The first Blue bar will caution when a...
Nothing fancy in terms of code, take this post as an educational post where i provide information rather than an useful tool.
Time-Series Forecasting And The Drift Method
In time-series analysis one can use many many forecasting methods, some share similarities but they can all by classified in groups and sub-groups, the drift method is a...
The original script was posted on ProRealCode by user Nicolas.
This is an indicator made of the linear regression applied to the rate of change of price (or momentum). I made a simple signal line just by duplicating the first one within a period decay in the past, to make those 2 lines cross. You can add more periods decay to made signal smoother with less false entry.
Linear Trend Follower follows 'source' trend using lines within a number of periods ('length') using the last n periods source variation divided by 'length' as line slope. It is delayed by 'length' periods.
draws a line from 2 vectors(price, time)
reformatted the function,
added automatic detection of the period multiplier by approximation(gets a bit goofy with stocks/week time),
example using timestamp() function.
offsetting is still bugged, i cant find a way around it atm.