[_ParkF]Linreg & Trendlines* The script has been uploaded again.
Linear regression and trendline not only facilitate trend identification,
but also identify support and resistance within it,
and linear regression and trendline departure can detect trend changes, which are useful in trading.
Linear regression and trend lines are shown in the chart.
It offers a variety of options, length, color, thickness, on/off switch, etc.
I hope it will help you with your trading.
hope you become rich!
---------------------------------------------------------------------------------------------------------------------------
* 스크립트가 다시 업로드 되었습니다.
선형 회귀(채널) 및 추세선은 추세 식별을 용이하게 할 뿐만 아니라,
또한 그 안에서 지지와 저항을 식별하고,
선형 회귀(채널) 및 추세선 이탈은 거래에 유용한 추세 변화를 감지할 수 있습니다.
선형 회귀(채널) 및 추세선이 차트에 표시됩니다.
길이, 색상, 두께, 온/오프 스위치 등 다양한 옵션을 제공합니다.
거래에 도움이 되셨으면 합니다.
부자되세요!
---------------------------------------------------------------------------------------------------------------------------
* I would like to express my gratitude to zdmre for revealing the linear regression source.
Autotrendline
TrendLine ChannelsAbstract
This script provides a set of Trendline Channels which can be tighter than Donchian Channels.
This script computes the most suitable active upper and lower trendlines and updates them as soon as possible.
We can use it for breakout signals earlier than Donchian Channels.
Introduction
Channels are tools which can mark area of values of ranging markets.
Once the price leaves the original region, range traders may start admitting they are wrong and trigger trend.
Donchian Channels (misheard as Dungeon Channels) use the highest and the lowest price to define area of values.
When the price breakouts, it just like it got released from a dungeon.
However, waiting for the price making even higher or lower may be too late and risk reward ratio may be lower.
Trendlines can make the channels tighter and we can find earlier breakout signals.
Computing Trendline Channels
(1) Find the most active trendlines
In this script, a valid trendline connects two high values or two low values.
A high value means the highest value in a trading day.
A low value means the lowest value in a trading day.
In this script, every trendline does not crossover any bar but can exactly touch them.
The most flat trendline is taken. (one for upper and one for lower)
(2) Continue to use or Change a trendline
If there is a tighter trendline available, this script changes to use it.
If the previous active trendline is broken, this script re-computes the trendline available.
When this case happens, this script display with an another color.
Otherwise, this script continues using the previous trendline.
(3) Middle line
The middle line indicates the middle value between the upper and the lower.
Parameters
Length : how many days are used for computation. The default value is 16 just because 16=4*4, using binary characteristic.
x_go_on : If the previous trendline is not breakout and there are no tighter trendlines available, we continue use it.
Color Options
(1) Upper trendline (no update or tighter)
(2) Upper trendline (changed due to breakout)
(3) Middle line
(4) Lower trendline (no update or tighter)
(5) Lower trendline (changed due to breakout)
Conclusion
Trendline Channels can be tighter than Donchian Channels and evaluate earlier breakout signals.
Comparing to known auto trendline scripts, Trendline Channels is continuous.
Once a trendline is broken, Trendline Channels can instantly point out the next available one.
If you think the price movement is boring or you cannot have good risk reward ratio, you can go to an another timeframe.
Reference
How to trade with Donchian Channels
How to trade with Trendlines
Trend LineBasic Trend Line base on fractals (v0.1)
Can not draw a line on the future X axis, So just a line segment but not a ray.
I don't have a better idea to upgrade...
Automatic TrendlinesIntroduction
For a full free tutorial explaining this code in more detail, visit the backtest-rookies (.com) website.
This indicator will plot two trend lines at any given time. A resistance trend line and a support trend line. The resistance trend is shown with red circles and is created by joining swing highs together. The second is a support trend which is created by joining swing lows.
Since we need swings to make the trend, the trend line code contains code for the swing detection. You can play around with the swing detection to alter how frequently new trend lines are detected. Relying on swings also means that there will be some delay in trend detection depending on how you configure the swing detection. The higher you set rightbars, the more lag you will have before a trend is detected. However, at the same time the quality of the pivots found will increase. So it is a trade-off you need to come to terms with and decide what the best settings are for you.
Lines
A single trend line is made up of several components.
Pivot Points: Marked as blue or orange circles. There will be two pivots per trend.
Orange/Purple Lines: Connecting all pivot points. You will see these lines change direction slightly each time a new pivot is detected (new circles appear).
Green/Red Circle lines: Showing the trend line from the earliest moment a new trend is detected.
Blue Dashed lines: Joining the purple and green/red circle lines so the full trend line can be seen.
Note: The blue dashed lines use pine-scripts drawing functions. As such, there is a limit to how many of these can be placed on a chart. When the limit is reached, the oldest line will be removed so the newest can be drawn. This means that if you detect enough trends and scroll back in time, the blue dashed lines will disappear at some point!
Trendlines 2x +Copy of "Trendlines - JD" script by Duyck, which draws Trendlines from the pivot points in the price chart.
I have simply Doubled the amount of Trendlines, so now there are;
A Primary set of Trendlines at a higher lookback length and Thicker Line Width
and
A Secondary set of Trendlines at a Lower lookback length and Thinner Line Width
The default values work well when comparing multiple time frames at 3x time difference, play around with these values for other x time variations
I have also simplyfied the Trendline Extension Function to make it more user friendly
Please use the Alerts with caution as the Trendline Break function still needs to be optimised
Also included are Trend Candles to color the bars according to momentum, Trencandles script is a copy of UCS_Trend by ucsgears