LonesomeTheBlue

Trend Lines v2

Hello Everyone. After working on new and better trend lines script for couple of weeks, finally I am proud to publish Trend Lines v2.

How it works?

- On each bar it finds last 10 higher and lower Pivot Points ( PP ).
- from first bar to 10. PP it search if a trend line is possible
- for each it starts searching from the last PP .
- it check if drawing a trend line possible or not and also it's broken or not
- if it's broken then optionally it shows broken trend lines as dotted
- if it finds a continues trend line and stop searhing more and draw trend line (I did this to make the script faster, otherwise you may get error because of it needs time more than .2sec)
- the script makes this process for each PP

optionally trend lines may be Solid or Dashed

optionally you may get rid of broken trend lines if you think it's crowded

and sometimes you may not see any trend line on the chart. this means you need to adjust the period for Pivot Points accordingly

also I made a video. if you watch this video you can see how the script works.


Important! after you add this tool to the chart you may need zoom-in and zoom-out to see all lines!

I thought a lot to make it free or not then I decided make it free and open source. you should know there is a lot of effort for this script, so if you think this is usefull please consider a donation ;)

Enjoy!

Release Notes: Important Update:
- "CHANGE BAR COLOR" option added. now able to change bar color when trendline was broken up or down.
- Alerts Added (for broken Trendlines)

A screenshot, how bar color changes when trendline was broken:
Release Notes: Added Start Year, Month, Day. I did this because some users say they got "calculate takes too long to execute > 20000 ms" errow.

in current version now by default it starts calculation from 01.01.2020. You can set closer start date if you use small time frames like 3mins, 5mins, etc.

If you set start date accordingly, you will not get any error.

Enjoy!
Remove from Favorite Scripts Add to Favorite Scripts
If you find my works useful, please consider a donation
BTC: 19qDW9AShZhBZsGuXcgRzam5Fbpc3EU8EV
ETH: 0x39c8552371b9b7f4e324197af460ba8bc8e18ef9

Comments

HEY, can u pls make some type of indicator for Support/Resistance
Reply
woah... hell of an update there. awesome stuff.
Reply
Hey man, thanks a lot! Very good!

Could you add a boolean, an input, to enable/disable the whole thing? Like don't show any lines if it's disabled ...

Thanks mate.
Reply
took too log to calculate error
+1 Reply
sirisaac68 stph_li
@stph_li, Change the start date.
+1 Reply
This is an absolutely amazing piece of software and I will share with everyone I know. I just have one minor problem: when my scale is in auto mode, the chart gets squeezed when the trend lines are on. This doesn't happen with any other indicator. Here's a screenshot of this happening.

Also, suggestion: there should be descending support lines and ascending resistance lines, such as in wedge patterns like this:

Thanks!
+1 Reply
One of the best auto trendlines I,ve seen.Good Job.
+4 Reply
Sir, if for example we apply this on the USDBTC 1H chart, we get an error "calculate takes too long to execute: >20000ms. How to surpass this?
+4 Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out