OPEN-SOURCE SCRIPT

Two Fractals Trendlines

Updated
This study draws a trend line for the last two Bill Williams up-fractals and down-fractals.

Trend line break signals and alerts can optionally be added.
Release Notes
Bug fixed.
Release Notes
RSI filter added.
Release Notes
Narrow range bar added.
Inside bar added.
Outside bar added.
Sandwich bar added.
Pin bar added.
Release Notes
Narrow range bar added.
Fakey added.
Release Notes
Improved the Fakey signal (F).
Added early Fakey signal (f).
Release Notes
Minor changes.
Release Notes
Plot Fractals added.
Release Notes
Reverse fractals added.

Segments added (taken from Joe Ross' books). These Segments are an early trend detection method. I will add Segments to my "The Strategy - ..." script in the next days.
Release Notes
Changed segment signal plotting. Now the segment signal is not deleted if a segment series is no longer valid. By definition, the segment signal cannot be repainted. The segments follow higher lows and lower highs.
Definition of a valid long signal: there are three segments and the current candle high is higher than the last candle high (high> high [1]).
Release Notes
Tooltips added.
Trend line bug fixed.
Release Notes
General description added.
Release Notes
Minor changes.
Release Notes
Groups added. Minor chnages.
Release Notes
Pin bar detection improved and minor changes.
Release Notes
Screenshot issue.
Release Notes
Segments- signal and documentation improved/changed.
Release Notes
EMA cloud added.
Release Notes
Horizontal support and resistance lines added.
Release Notes
Multi time frame classic pivot points added.
Release Notes
Source for SR-lines added.
Release Notes
Attributes of drawn objects added.
Release Notes
Pin bar revised.
Release Notes
Divergence signal and momentum indication added.
Release Notes
Removed the momentum indicator. You can use the "RSI with BG" script for momentum indication where you can toggle between RSI and RSI Stochastic.
Minor changes/improvements.
Release Notes
Quarterly classic pivot points added. Maximum outputs with this script reached.
Release Notes
Minor changes.
Release Notes
Uncommented daily and weekly pivot points (output restrictions). Added 6 month and 12 month pivot points.
Release Notes
Script converted to Pine v5.
Release Notes
Script revised.
1 week pivot point added.
Signals added/revised.
Release Notes
HMA slope as background color added.
Trend line signals and bg signals can be displayed at the same time, now.
Release Notes
Trend info panel added.
Release Notes
Documentation issue.
Release Notes
Bollinger Bands added.
Release Notes
Minor modifications.
Release Notes
Divergences labels removed.
Default settings changed.
Release Notes
Added "Last 12". Due to output limitation (max. 64), I commented out the pin bar indicator.
Release Notes
“Last 12” made variable.
Bill Williams IndicatorsInside Barnr7baroutsidebarPin BarpriceactionRelative Strength Index (RSI)tendlineTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer