Trendlines with Breaks [LUX]

To complete our previous work on breakouts with pivot point-based levels, we introduce an indicator returning pivot point based trendlines with highlighted breakouts. Users can control the steepness of the trendlines as well as their slope calculation method.

The indicator also includes integrated alerts for trendlines breakouts.


  • Length: Pivot points period
  • Slope: Slope steepness, values greater than 1 return a steeper slope. Using a slope of 0 would be equivalent to obtaining levels.
  • Slope Calculation Method: Determines how this lope is calculated.
  • Show Only Confirmed Breakouts: Only shows confirmed breakouts when enabled.


Any valid trendlines methodology can be used with the indicator, users can identify breakouts in order to infer future price movements.

Break labels highlight breakouts and are delayed by length bars (with the exception of breakouts with the dashed trendlines which are not delayed). By default the indicator shows any breakouts, toggling on "Show Only Confirmed Breakouts" will allow showing only significant ones. Note that this will not affect breakouts with the dashed trendlines .

The calculation method of the slope greatly affects the trendline's behaviors. By default, an average true range is used, returning a consistent slope amongst trendlines . Other methods might return trendlines with significantly different slopes.

Stdev makes use of the standard deviation for the slope calculation, while Linreg makes use of the slope of a linear regression .

The above chart shows the indicator using "Stdev" as a slope calculation method. The chart below makes use of the "Linreg" method.


TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。