Harmonic Pattern Based Supertrend

Harmonic Pattern Based Supertrend
Harmonic Pattern Based Supertrend

When we talk about Trend Following, we cannot ignore supertrend. Supertrend is one of the most popular trend-following technical indicators. Generally, supertrend is derived by ATR-based stops. In this adventure, we try to derive supertrend based on harmonic patterns reversal levels.

Link to the Indicator: Harmonic Pattern Based Supertrend

Concept - Harmonic Pattern Based Supertrend

Extending the earlier implemented concept of Harmonic-Patterns-Based-Trend-Follower, in this script, let us make it work as a supertrend so that it is easier to operate.

Process

  • Derive Zigzag and scan harmonic patterns for the last 5 confirmed pivots
  • If a pattern is found, bullish and bearish zones are calculated based on the parameter Base
  • These bullish and bearish zones act as supertrend based on current trade in progress.
  • When in bullish mode, the bearish zone will only go up irrespective of a new pattern forming a new low. Similarly when in bearish mode, bullish zones will only come down - this is done to imitate the standard supertrend behaviour.

Note: Patterns are not created on the latest pivot as the last pivot will be unconfirmed and moving. Due to this, patterns appear after a certain delay - patterns will not be real-time. But, this is expected and does not impact the overall process.

Here are a few charts capture to demonstrate how it works.

Harmonic Pattern Based Supertrend - Lag in showing the pattern
Harmonic Pattern Based Supertrend - Lag in showing the pattern
Harmonic Pattern Based Supertrend - Change in Trend
Harmonic Pattern Based Supertrend - Change in Trend

Settings - Harmonic Pattern Based Supertrend

Minimal inputs are needed from users and hence the indicator has very simple settings. You just need to set the zigzag length and error threshold to calculate patterns.

If you are looking for long-term trends and a higher-stop threshold, increase the zigzag length. For short-term trades, use shorter zigzag lengths.

Harmonic Pattern Based Supertrend - Settings Snapshot
Harmonic Pattern Based Supertrend - Settings Snapshot

 

Comments