TradingView
ClassicScott
2021年11月12日午後6時4分

+ Balance of Power 

Cardano / US DollarBinance

詳細

The Balance of Power is an indicator that measures the strength of buyers versus that of sellers in the market, and needs to be smoothed by a moving average to be of much practical use (come to think of it, most indicators are smoothed by a moving average; this is why the RSI lookback mostly commonly used is 14, and not 1, but I digress...). I suppose it is possible to use it without smoothing, but that would be very difficult I think.
The oscillator pivots around a center line, and as with most indicators like this, above 0 is generally considered bullish in a bullish trend, and vice versa in a downtrend.
It can be good for spotting divergences (moreso with smaller lookback periods than I like).

To wit, you might be wondering why I have the default lookback period set at such a large number. My only answer I can give is that I prefer it that way.
The indicator is quite choppy, even when smoothed. The long period helps me to make beter sense of the data (smooth it with a Hull or Jurik MA and you get a different story, though).

In my version of this indicator I provide a pretty broad selection of moving averages with which one may choose to smooth out the BOP, as well as an EMA provided to use as a sort of signal line for trade entries and/or exits, taking partial profits, scaling into a position, etc.

I've also added the option for a second BOP, which is on by default. I think you might find the results interesting by pairing differently smoothed BOPs together.
Of course, you don't have to use both. In the case of the default settings you might look at the EMA-BOP crossing the JMA-BOP as an opportunity to look into exiting or entering trades.

Candle coloring is, as usual, included. I'd say I kind of overdid it here, but that seems to be my style. I just couldn't deal with the fact that with the indicator set to cumulative modes there is no zero line, therefor the color of the indicator plot and the candle coloring would not match the color swatches for bullish/bearish colors. So, there are selections for cumulative indicator/candle colors, and standard indicator/candle colors. Donchian Channels obviously doesn't matter because the colors of things are based on the channel only.

I've added Donchian channel bands (which I've begun adding to many of my indicators), and all necessary alerts as well.
The Donchian Channels can be a really effective tool for entering and exiting trades. I haven't mentioned it in my other indicators that have it, so I will here:
The outermost edge of the band is that which references the indicator for where it is plotted, and the inner channel is sort of dragged along, creating the band
It's a simple mathematical calculation that TradingView actually provided themselves in their manual for pinescript.
When the BOP (or any other indicator using this) enters the band and then exits that could be an indication that price may be reversing, this the bands themselves act, or rather, show a current area of support/resistance for the BOP plot.
One thing that I did with it that they did not, is give the user the ability to change the width of the band. It can only go so narrow, obviously, but anywhere from three (quite wide) to eight is probably sufficient.

I've also provided the option of plotting the BOP as a cumulative line (like OBV), making it no longer an indicator which oscillates around a central pivot.
Because the balance of power is plotted as an accumulation, you may actually want to set the lookback to 1 (it works because it's not an oscillator then).
If you wish to smooth the noise, I suspect a low number would be acceptable here, but it's not necessary.

Oh, and lastly (almost forgot, as this was a late addition), I've added options for the BOPs calculated with volume as well. Gives a different bit of a perspective on the market, versus the traditional version which does not include volume. Screenshots below.


The above image is the balance of power calculated with volume. You can see the obvious difference versus the traditional indicator, where price is in a downtrend and you'd want to sell the orange.


Cumulative version. Looks a lot like OBV.


Cumulative version with volume.

リリースノート

I just changed 'power' to a float from an integer so that you can fine tune the moving average more. It was something that someone pointed out to me in a comment of another indicator I released.

リリースノート

added auto-plotting divergences


Image above shows the Balance of Power (top) versus the Cumulative Balance of Power. By default hidden divergences are not on (yellow and fuchsia lines), but I thought I'd post this image comparing the two types of BoPs with all divergences ticked.

リリースノート

added UMA as a way of smoothing the BOP.
added alerts for divergences

リリースノート

- updated to pinescript version 5
- changed some wording
- added T3, RMA, and VWMA moving averages
- added some tooltips (info at certain indicator inputs)

リリースノート

I'm publishing updates to all of my indicators, so I'm just going to comment on everything here since most of the updates are common across most of my indicators.

User Non-Visible Updates (basically backend stuff that makes:
- changes in code legibility and consistency across all indicators (basically standardizing the coding across as many indicators as possible)
- implementation of libraries into my indicators; which helps significantly in doing what I typed above; which in turn will make creating any new indicators, if they are of the type to use these libraries, much simpler
- updated descriptions for all indicators, which should (it's possible I've forgotten things) reflect changes I've made recently and any I may have made in the past after first publication (this is very minor, but as I was changing so much I thought I may as well--I don't intend to update these much, if at all, in the future)

User Visible Updates:
- as I mentioned everything now uses my moving averages library and volatility bands library--this cuts down the total amount of code significantly, and has made it easier for me to add moving averages, or volatility bands to these indicators because I only had to/have to add it one time (to the library) rather than multiple times across all indicators*
- since creating these libraries I've added several new moving averages (Kaufman Adaptive, Laguerre Filter, McGinley Dynamic (doesn't work for all), and Zero-lag) to them while retaining all the previous with the exception of the UMA, which wasn't implemented consistently across all indicators anyway
- eliminated having two Bollinger Bands with different standard deviations and a fill between them in exchange for one with the band fill implementation that I use on my Donchian Channels Bands
- part of my code consistency across all indicators resulted in a much needed organization of the 'style' tab

*(affects all but the Wavetrend Oscillator, Wavetrend Oscillator Overlay, Jurik KDJ, Average Candle Bodies Range, Bollinger Bands Width, ALMA Trend Detector, Ultimate Moving Average, Donchian Channels, and Dynamic Donchian Channels)
コメント
Pimlin
This is not the same indicator it was before update. It is much more following price movement now.
It is difficult to pinpoint but it feels like completely different indicator than it was before, and it was one of if not my favorite one.
Also values are much much higher now, that I can tell for sure.
Thank you for your contribution on Pine.
Pimlin
@Pimlin, I will reply to myself as a way of edit. There is 'BoP type' in settings and choosing not to have cumulative volume looks more like older version. Not bad finding so far.
ClassicScott
@Pimlin, Yes, the "type" of indicator matters very much how it will respond to price movements. Also, how you choose to smooth it, if you do, will effect its movement as well. Using either of the volume versions of the indicator will obviously incorporate volume data into the calculation, so if there is little volume the indicator won't move in the same way as the types that don't incorporate volume data. Also, the moving averages to smooth the indicator are going to change how it moves too.

I do believe I changed the default Balance of Power Type to something different from prior versions, so if you always used the default settings it will be different.
Mikeillathrilla
hey man I'm loving this indicator, I was wondering if you had another indicator in mind to pair with this one? sometimes the balance of power and the price action do not match each other like either the bop is moving down and price action is moving up or price action is going down and bop is going up. I'm using the 30 second time frame as well when I encountered that problem. thank you!
ClassicScott
@Mikeillathrilla, any other oscillator, like Wavetrend, should work. Balance of Power does sometime diverge from price for long periods. Personally, I would just not take any trades at that time, but instead wait for price and BoP to come back into alignment.
Mikeillathrilla
@ClassicScott, idk how but the timing of you comment and me finding something similar to that is on point lol thank you again for your amazing work.
INDO-SURFER
OUTSTANDING!!...THANK YOU...smoothing the BOP with VAMA[3]
ClassicScott
@INDO-SURFER, Glad it works for you!
MooreMuzik
Hey will you able meet with me via zoom to help me fully understand ....this indicator is HEAVY but i love it lol
TMK2
This is amazing. I actually really like all your Donchian Channel - infused indicators.

Lovely works of art! Thanks, man!
詳細