Steversteves

Groupings [SS]

Hey everyone,

Releasing this indicator called groupings.
If you watch/read my analyses on Tradingview, you will have heard me talk about groups. Groups is something I invented. What it is, is just taking the Euclidean Distance (ED) of the previous 5 candles in a specified period (i.e. daily timeframe, weekly, 1 minute, 5 minute, etc.) and rounding the ED up to a whole number.

I have had great success in this approach because the information provided is broad enough to give leniency in interpretation but narrow enough to hone in on potential moves and target prices.

This indicator is a simplified version of how I do groupings in other software, however it is no less powerful!

What do groups tell us?

A "group" takes into account the previous 5 candles, using the ED. This gives Pinescript a general idea of what the short term trend looks like mathematically. From there, Pinescript can look for other groups that looked similar to how this current trend looks. From there, it can offer us insights into what tends to happen in candles subsequent to this group. For example, the ATR range, the close range and whether it is bearish or bullish.

And that is precisely how this indicator operates, Pinescript will calculate the group of the previous 5 canndles in the timeframe period you are looking at. It will then lookback over the designated "train" length and identify previous groups, and what happened in those groups. It looks specifically at:

- What is that average High ATR associated with that group,
- What is the average Low ATR associated with that group,
- What is the average close range associated with that group,
- What is the sentiment associated with that group.


How to use the indicator?

In terms of use, the indicator is relatively simple to use. It will plot three lines, a red for the anticipated low range, a green for the anticipated high range and purple for the opening range (where the current candle opened at).


In addition, it will plot a dot for the anticipated close area. When the dot is green, it expects a bullish close. When the dot is red, it expects a bearish close.
The indicator is going to give you a heads up as to whether we are in a bullish group, what you can anticipate the high and low range to be and where you can anticipate the close.
Of course, its not always exact, as in the image above you can see it underestimated the high range and over-estimated the low range; however, we did close within the anticipate range.
The indicator is meant to help you with your bias. I will reference this indicator on the daily timeframe at open to see what the expectations are for the day.

However, you can use it on any timeframe you wish.

Other functions:

The indicator can plot the EMA 9, 21 and 5. These are the 3 indicators I like and I find them helpful for both intraday and swing trading. However, they can be toggled off if you do not wish to view them.

In addition, the EMAs will be green if the ticker is trending above the EMA 21 (which is a critical EMA for me to determine the immediate sentiment). If the ticker is below, they will turn red.
There is also the ability to adjust the train time. The default is 1,000 candles back, but I usually have it on 1500. If you have a lot of indicators and a lot going on, on your chart, you may find that 1500 is too much and it will lag/error. That’s okay, 500 candles is sufficient and will not put a lot of stress on Pinescript.

Concluding remarks

Its overall a fairly simple concept and indicator, but it has been a neat and helpful / insightful invention. I originally developed this using R and happy to have now brought it into Pinescript.
I hope you enjoy!

Safe trades everyone!

Premium indicators and content have launched! Get access at: www.patreon.com/steversteves
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?