OPEN-SOURCE SCRIPT
업데이트됨 Auto TrendLines [HeWhoMustNotBeNamed]

I started off with the intention of creating script to identify Wolfe wave projection. But, soon ran into problem with loops. Realized drawing wedge is more difficult than drawing converging triangle. Hence, took a step back and started working on wedges and triangle identification. Ended up with a messy output which looked like this.
https://www.tradingview.com/x/ave1kufu/
Had to take another step back and hence decided to make Trendlines detection script and here we are :)
⬜ Process
▶ Scan pivots which are in trend. This means, series of pivot Highs or pivot lows either in ascending order or descending order.
▶ Draw trend line between each of the pivots in the trend series. For example, if there are 5 pivot high uptrend pivots, draw mXn lines between each of these points.
▶ Select the trend line which is more accurate or stronger. Accuracy is measured by number of candles/wicks touching the line and number of candles which fall outside the line. Stronger trendlines will touch more candles and pivots with less overflow.
▶ Remove all lines except the most accurate one for each direction.
At any point of time, you will see upto 4 trend lines in this script.
▶ Trendline joining pivot highs in uptrending condition
▶ Trendline joining pivot lows in uptrending condition
▶ Trendline joining pivot highs in downtrending condition
▶ Trendline joining pivot lows in downtrending conditions
The older line will remain until the new one comes through of same type. Hence, you will still be able to see uptrending high and low trend lines for downtrending instruments which are created way back!! Also, new trendlines replace old ones only if they are more stronger (connect to more pivots with less overflow)
⬜ Settings
Settings are simple.
https://www.tradingview.com/x/UJMoDpIz/
User can select preferred Zigzag Length and Search Depth. Higher numbers for these two parameters will present longer term trends whereas lower numbers will display shorter ones.
Trend Lines controlls will allow users to enable/disable specific type of trend line, set color and line style to it.
⬜ Few Examples
▶ Uptrending Market :
NDX
https://www.tradingview.com/x/NZTX6aXK/
▶ Downtrending Market :
BABA
https://www.tradingview.com/x/28CZwBWd/
▶ Ranging Market : $NYSE:PLTR
https://www.tradingview.com/x/UPXhzI6e/
https://www.tradingview.com/x/ave1kufu/
Had to take another step back and hence decided to make Trendlines detection script and here we are :)
⬜ Process
▶ Scan pivots which are in trend. This means, series of pivot Highs or pivot lows either in ascending order or descending order.
▶ Draw trend line between each of the pivots in the trend series. For example, if there are 5 pivot high uptrend pivots, draw mXn lines between each of these points.
▶ Select the trend line which is more accurate or stronger. Accuracy is measured by number of candles/wicks touching the line and number of candles which fall outside the line. Stronger trendlines will touch more candles and pivots with less overflow.
▶ Remove all lines except the most accurate one for each direction.
At any point of time, you will see upto 4 trend lines in this script.
▶ Trendline joining pivot highs in uptrending condition
▶ Trendline joining pivot lows in uptrending condition
▶ Trendline joining pivot highs in downtrending condition
▶ Trendline joining pivot lows in downtrending conditions
The older line will remain until the new one comes through of same type. Hence, you will still be able to see uptrending high and low trend lines for downtrending instruments which are created way back!! Also, new trendlines replace old ones only if they are more stronger (connect to more pivots with less overflow)
⬜ Settings
Settings are simple.
https://www.tradingview.com/x/UJMoDpIz/
User can select preferred Zigzag Length and Search Depth. Higher numbers for these two parameters will present longer term trends whereas lower numbers will display shorter ones.
Trend Lines controlls will allow users to enable/disable specific type of trend line, set color and line style to it.
⬜ Few Examples
▶ Uptrending Market :
https://www.tradingview.com/x/NZTX6aXK/
▶ Downtrending Market :
https://www.tradingview.com/x/28CZwBWd/
▶ Ranging Market : $NYSE:PLTR
https://www.tradingview.com/x/UPXhzI6e/
릴리즈 노트
⬜ Few Major Updates▶ Custom Candle Source
Added feature to chose custom candle source
https://www.tradingview.com/x/2YWueTmN/
Making use of customcandles library methods to derive custom candles. Availalbe candle source options are :
- regular (Regular OHLC candles)
- ha (Heikin Ashi Candles)
- ma (Moving Average Candles)
▶ Historical Trail
Added option to show historical trail of trend lines. Trail will appear as dotted lines with low visibility so that it will not take too much chart space and impact visibility.
https://www.tradingview.com/x/3FFf9zLe/
▶ Live Stats of nearest trendlines
Live stats are shown for the immediate and nearby trendlines. If the trendline is far away, then it will not be shown. At least two trendlines stats will be shown.
https://www.tradingview.com/x/VvcLvjUr/
릴리즈 노트
- Added last update status to table - which shows how many bars back the trendline was created.
- Added trend watermark - which shows whether high and low trendlines are in Uptrend, Downtrend, Converging or Diverging Triangles :)
https://www.tradingview.com/x/YmyXPivB/
Whereas
https://www.tradingview.com/x/UhyEwEQp/
릴리즈 노트
Fixed memory issue릴리즈 노트
Minor updates릴리즈 노트
Update preview릴리즈 노트
Update preview릴리즈 노트
Update to Pine v6오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.