OPEN-SOURCE SCRIPT
Telah dikemas kini

Volume Patterns [SS]

2 141
Hey everyone,

Been a while since doing anything with Pinescript.

Here is my iteration of a Volume Pattern identification, inspired by Bulkowski's work on patterns and volume.

The indicator aims to identify the 4 major types of volume patterns, these are:

  1. Bullish Breakout Volume
  2. Bearish Breakout Volume
  3. Inverted Domes
  4. Domes



Classification

These patterns are all assigned to a classification based on theory. For example, dome volume is usually bearish, inverted dome is usually bullish, etc. etc. However, in order to accommodate changing sentiments and volatility, I have coded logic into the indicator to assess for the actual sentiment associated with these patterns itself.

The indicator calculates the average return associated with each pattern, scaling the data into a percent return. It then has the ability to re-scale the target using the close price associated with the pattern at the time of pattern signaling, to calculate the target price and plot the target on the chart for you.

Additionally, it provides you with the following:

  • Labels to signal when a pattern has happened
  • A table that shows you the average returns associated with the 4 major patterns
  • Target lines with labels that visually show you the target price associated with the pattern, as well as which pattern they are associated with.


All of these things can be toggled on or off depending on your preference.

Customizing the indicator

In addition to being able to toggle the visuals on or off depending on what you want to see or not see, there are some minor customization abilities in terms of training the indicator to recognize the patterns and predict the TP.

The first one is the Training length

In the settings, you will see "Train", and the default is 500. This is the amount the indicator is looking back in history to learn the patterns and returns associated with them. This 500 is appropriate in most cases and on most timeframes.

Lastly, the Lookforward Length

The look forward length represents the number of bars forward you want to determine the returns for. It is defaulted to 10, but you can modify it.
So, if you are on the 1-Minute chart and have the look forward set to 10, then once a signal happens, the target price is calculated based on 10 minutes from the time of signal. You can increase this or decrease this based on your preference.

Longer look forwards can be good for swingers but should be used on the larger timeframes, shorter are good for scalpers but should be used on the shorter timeframes.


The indicator's use is incredibly simple, you'll pick it up in no time!

Hope you enjoy it and as always, safe trades!

Just an FYI for those who may have questions:

  • The indicator is open source. This means you are free to take it and modify it as you wish. You do not need to ask me.
  • Please read the description carefully, as 100% of questions I am asked about indicators are covered in the description. ;-)


Have a good one guys and gals! 🚀🚀🚀
Nota Keluaran
ooops,
Left some debug code accidentally in the final product. Fixed!

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.