This is my take in Head & Shoulders (regular H&S)
The script will wait until a valid point E is found, which means A, C and E are alined

Then it will find the highest point between C - E -> Head (= D),
together with the highest point between A - C -> Left Shoulder (= B)
After this, the pattern is drawn, together with a 'trigger' area (E-G - E'-G' ~ 'Right shoulder area')

ONLY in this field, when a close is higher than E'-G', the figure will turn green, if lower than E-G, it will turn red, else, it will be blue

Settings:
This script uses one of the latest fantastic Pinescript features:
linefill[] and for ... in loop
Cheers!
The script will wait until a valid point E is found, which means A, C and E are alined
Then it will find the highest point between C - E -> Head (= D),
together with the highest point between A - C -> Left Shoulder (= B)
After this, the pattern is drawn, together with a 'trigger' area (E-G - E'-G' ~ 'Right shoulder area')
ONLY in this field, when a close is higher than E'-G', the figure will turn green, if lower than E-G, it will turn red, else, it will be blue
Settings:
- Date range filtering
Here you can filter the patterns by setting the date period (for E) - Pivot Points -> Leftbars - Rightbars
- min/max retrace AD -> E
Set the retracement for E (retracement A -> D -> E, here between 1.4 & 1.5) - % tolerance [L ~ R shoulder height]
Tolerance of Right shoulder height against Left shoulder height
0% (= the same relative height):
85% (-> now close isn't higher than E'-G' -> blue coloured): - min/max % [Left Shoulder ~ Head]
Sets the desired B height against D (here B is between 35-45% of D): - width R shoulder = L shoulder + x%
Sets the width of Right shoulder against Left shoulder
0% (nothing extra, just the same width as Left shoulder)
100% (Right shoulder area is double as large as the Left shoulder):
-70% (Right shoulder area much narrower than Left shoulder): - maximum visible patterns:
Set the maximum visible amount of patterns
This script uses one of the latest fantastic Pinescript features:
linefill[] and for ... in loop
Cheers!
Release Notes
Code improvementRelease Notes
updateRelease Notes
updateOpen-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.
For quick access on a chart, add this script to your favorites — learn more here.
Who are PineCoders?
tradingview.com/chart/SSP/yW5eOqtm-Who-are-PineCoders/
TG Pine Script® Q&A: t.me/PineCodersQA
- We cannot control our emotions,
but we can control our keyboard -
tradingview.com/chart/SSP/yW5eOqtm-Who-are-PineCoders/
TG Pine Script® Q&A: t.me/PineCodersQA
- We cannot control our emotions,
but we can control our keyboard -
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.
For quick access on a chart, add this script to your favorites — learn more here.
Who are PineCoders?
tradingview.com/chart/SSP/yW5eOqtm-Who-are-PineCoders/
TG Pine Script® Q&A: t.me/PineCodersQA
- We cannot control our emotions,
but we can control our keyboard -
tradingview.com/chart/SSP/yW5eOqtm-Who-are-PineCoders/
TG Pine Script® Q&A: t.me/PineCodersQA
- We cannot control our emotions,
but we can control our keyboard -
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.