nickbarcomb

Trend Lines

Automated trend lines
Release Notes: Cleans/ simplifies script and fixes bugs where the a line might not draw.

Also adds a yellow average line
Release Notes: Adds color background to ranges
Release Notes: Attempt to fix "Internal server error" issues...
Release Notes: adds the ability to toggle lines
adds the ability to smooth the source value to partially ignore random spikes
Release Notes: think I finally fixed the runtime error during tick change
Release Notes: simplifies the x,y lookups
adds more customization
removes time-based checks
Release Notes: fixes high, low inits which were cause line to disappear
Release Notes: reduced for loops
Release Notes: adds historical line trace
Release Notes: renames plot lines to more easily appear in alerts dropdown
Release Notes: fixes average line
Release Notes: - Simplifies the UI to be more instantly apparent of the trend and it's start and end points.
- Simplifies the script down to a simple for loop
- Adds toggle for historical trace lines and prints them as stepline
- **HOPEFULLY** fixes the server error issue

Apologies to anyone that was using the previous version whose settings will get reset, but I think you'll enjoy this version much better.

TODOs: The trace points currently only work with non-log view -- update the code to check for log view and update the linear-extrapolation algorithm to a logarithmic-extrapolation
Remove from Favorite Scripts Add to Favorite Scripts
This is one of the best script so far :) Thanks bro for this great script. Looks like the error occur when the new bar shows up. Looking forward to see you solve the issue.
Reply
nickbarcomb greywolf254
@greywolf254, thank you very much. I'm still trying to figure out a work-around for the root cause of the error. My latest guess is that this is a timeout issue caused by the for-loops and the line drawing mechanism being too resource intensive. I'll continue to debug and hopefully TV will optimize the line drawing method.
Reply
really awesome script. i tried the other auto trendline apps in the indicators section but they sucked. this one doesnt thank you
Reply
Nice.
Is there anyway to add alerts for when price crosses trendline?
Reply
@Lij_MC, not at the moment, but I like the idea. I'll try adding it to a future update!
+1 Reply
@Lij_MC, Hey there. I've added plot lines which trace the path the lines take over time which should allow you to add alerts against the current bar. There is still the slight chance that the script will throw a server error and your alert may not fire properly. Apologies in advance -- I'm working with the TV team to try and fix that.
Reply
@Lij_MC, So my math is a bit off and the plot points only align with the NON-log view of the chart. This shouldn't cause too many issues if you are looking on a somewhat short timeframe (daily or less), but it's worth pointing out that the plot points you can use to generate alerts may be slightly off the current bar's intersection. Cheers and good luck!
Reply
Lij_MC nickbarcomb
@nickbarcomb, Great thanks will give it a try
Reply
Also have "Internal server study error"
Reply
nickbarcomb theodorejuliano
@theodorejuliano, yeah, i've been trying several ways to fix it. The error isn't that useful and im still trying to pinpoint the problem. I just hide and unhide to get the indicator back. Thanks for your patience!
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing House Rules Moderators Website & Broker Solutions Widgets Charting Solutions Get Help Feature Request Blog & News FAQ Wiki Twitter
Profile Profile Settings Account and Billing TradingView Coins My Support Tickets Get Help Ideas Published Followers Following Private Messages Chat Sign Out