OPEN-SOURCE SCRIPT

Pivots High/Low 3bar No Period w/ Signals -Tom1trader

Updated
https://www.tradingview.com/chart/OsBXckpZ/
This price action indicator calculated on the relationship of 3 adjacent bars/candles adds an extra dimension to my indicator mix and with
a different perspective can help confirm or question an opinion formed by other indications (volume related, momentum, the chart itself and etc.).
Further, I have traded with it a bit now and like it. So much for comfort - I have seen no clear evidence that the movement of the next bar is paying any
attention to indicators, lines or patterns on charts. They are all based on the same historical data whether that data is run through an indicator algorithm
or used to draw (chart style) on a chart. But they make me feel better about my trades and I prefer them to a coin flip. :-)

Pivot High Definition - (Pivot Low is reversed): A three-bar pivot high represents resistance and is formed when sellers turn price from up to down. It is seen where a price bar with a lower high closes below the previous bar's low, where the previous bar's high is higher than the bar that preceded it.
Read more: Price Pivots Circle Big Profits investopedia.com/articles/trading/07/pivots.asp
Follow us: Investopedia on Facebook

I see some n period high/low indicators named pivots. This indicator has no period and is based on the relationship of 3 bars usually referred to as Pivots High Low.
Also no relationship to daily calculated "Pivot Points". As such this is a PRICE ACTION indicator. It works the same on ALL TIME FRAMES.

These pivots sometimes do not occur very often and usually are not at tops or bottoms.
This is why I used a combination of most recent PHs and PLs along with
the price to derive the signal.
Release Notes
Added alertconditions for Pivot High and Pivot Low (they do not exist until the close of the next bar so the alerts are for 2 bars / candles back.
This was at the request of user @msY. Had not set these before so had to figure it out so thanks for the suggestion! I also removed code that was commented out and cleaned up comments a bit. Enjoy!
reversalssupportSupport and ResistanceTrend 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