OPEN-SOURCE SCRIPT
Updated Double Top/Bottom - Ultimate (OS)

This is zigzag based double top/bottom indicator. Code is same as : Double-Top-Bottom-Ultimate
But, republishing it to make it available open source.
Double Top:
Double Bottom:
Few input options:
But, republishing it to make it available open source.
Double Top:
- Recognition - Checks on Zigzag if LH is followed by HH
- Confirmation - When low crosses under last lower pivot point on zigzag
- Invalidation - When high crosses over HH
Double Bottom:
- Recognition - Checks on Zigzag if HL is followed by LL
- Confirmation - When high crosses over last higher pivot point on zigzag
- Invalidation - When low crosses under LL
Few input options:
- Option to display risk per reward which defines how steep is the W-M triangle. This is simply the ratio of price difference between mid point to top most and bottom most points. In case of double top , downside is considered as reward and upside is considered as risk and with double bottom , downside is considered as risk and upside is considered as reward. Lower risk per reward signifies better trade.
- Option to display stats which shows number of occurances of double top and bottom and how many times price crossed confirmation point and invalidation point (which are also marked with dashed lines) Stats are color coded. Higher confirmation rates are colored in shades of green, lower confirmation rates are colored in shades of orange whereas the neutral confirmation rates are coloed in light yellow.
Release Notes
Added max_bars_back for resolve issue with historical bars.Release Notes
Fixed runtime errorOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.