OPEN-SOURCE SCRIPT

Buyers vs Sellers

Buyers vs Sellers is an indicator which essentially weighs the strength of the buyers against the strength of the sellers. It defines the current relationship between the buyers and the sellers as well as the way that that relationship is changing over time.

User Inputs:

1. Number of Bars To Include In The Calculation - this is the look back period. The amount of past data that is being processed.

2. Length of The ATR - higher values are recommended. This ATR is used as a unit in which the price changes are expressed.

3. Bullish/Bearish Bias Threshold - the minimum value to consider the buyers or the sellers having control of the price.

4. Net Move Average Length - the moving average of the sum of bullish and bearish price changes.

The Calculation Process:

This indicator measures the difference between the opening and the closing prices of each bar in the look back period.

After that it sums together the sizes of the bodies of all the bullish bars and also the sizes of all the bearish bars to create the total bullish price change and total bearish price change for the look back period.

After that it converts the total price changes into percentages of the ATR and divides them by the look back period to get the price change per bar - it is a way of getting the price change values down to less ridiculous numbers regardless of the look back period and while still keeping the proportions intact.

After that it sums the two price changes together to get the net move and performs a simple moving average calculation on it in order to smooth out the values. This is a numerical representation of the relationship between the strength of the bullish and the bearish moves, which is easily readable from the chart.

After that the indicator performs a natural logarithm of the bullish price change divided by the bearish price change. This calculation gives a relationship between the two values which is not tied to the volatility of the instrument, but is expressed purely as a relationship between the strength of one value against the other. The idea is that this would allow for easier comparison across different instruments as the same numbers would represent exactly the same distribution of the strength difference.

The Plotting Logic:

The ATR is plotted as just a number as a reference.

The natural logarithm is presented in two ways.
One way is numerical, to be able to precisely read the value and the colour of the number changes depending if it is positive and above the bias threshold or negative and below the bias threshold.
The other way is in the form of a background colour. It only visualises the bias that can be interpreted based on the logarithm value in relation to the set bias threshold.

The total bullish price change and the total bearish price change are both plotted as a line with the fill between that line and the zero line. This helps visualise the bullish and the bearish moves individually.

The moving average of the sum of the bullish and the bearish moves is added as a line to represent the relationship between the two on a graph and not just as a logarithm.

I hope this indicator will serve you well and help with defining the relationship between the buyers and sellers more objectively, hopefully leading to more profitable trades.

sentimentTrend Analysis

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

チャートでこのスクリプトを利用したいですか?

免責事項