As I was scanning through various charts the other day, I thought to myself it would be nice to be able to get an alert when a trendline on any given chart is broken. I put this study together to do just that. It’s designed for use on daily charts and the user simply inputs two dates and the type of trend to plot. An up-trend will plot a green line from the lows of the two dates and then project its extension into the future. A down-trend will plot a red line between the highs of the two dates and then project its extension into the future. When the close crosses over the extension, a chart alert is triggered. Recall that chart alerts only work when the given chart is active on your display or becomes active after being minimized. Also pictured is the Trend indicator. Don’t forget when trying to copy/paste the code below, use the built-in icons which reveal themselves in the upper right hand corner of the code window when your cursor enters the area. The leftmost button will display the code in a separate window as plain text and the second button will copy the code straight to your clipboard as text.