For analyzing price, I made a similar indicator based on Absolute and Indices, which you can find in the link below.
Here is part of the code used in the script: https://pastebin.com/raw/YH0VSX6n
Standard , OBV, ADL and PVT
To validate the calculations, I stacked UMF on , OBV, ADL, and PVT in the chart below (100% overlaps validate the calculations). It also shows how you can replicate these indicator if you'd like to use them, or if you want to make your own custom indicator by combining features from different indicators. I do not recommend , ADL or OBV; read "why invent a new indicator" section below. (bear in mind that scale is 0-100, while UMF scales is -100 to 100)
Money Flow based on "Balance of Power" (this is the default mode)
(BoP) equation is: (close - open) / (high - low)
In my opinion, BoP is the most accurate equation to measure the amount of accumulated or distributed. I used BoP in my previous open source indicators ADV, ADL, ADP and ADMF. I applied the "True Range" fix to BoP equation similar to what Twiggs did on CMF.
By changing aggregation methods, you can replicate my previous indicators which are also linked at the bottom of this page. Please read more about their applications in their respective pages.
aggregation method = Cumulative => ADL indicator: (price factoring should be turned off)
aggregation method = MA => ADMF indicator: accurate buy/sell pressure, momentum and divergence
aggregation method = MA Percent => ADP indicator: overbought/oversold conditions, buy/sell pressure, momentum and divergence, failure swings
Smoothing, signal line and histogram to detect trend and choppiness
You can apply additional smoothing to UMF. Also, you can add a signal line and histogram (histogram is the difference between main line and signal line). To do so, set the signal length to a number greater than one. Signal line can help you detect changes in trend similar to the signal line on . If signal line criss-crosses UMF, it shows market is choppy. The worst case is when this criss-crossing coincides with UMF flattening near neutral line and histogram height is short; that means market is ded (until it is not; expansion following a contraction period is a common phenomena)! (Bear in mind that histogram will not show in mode.)
To enable , change the length to a number greater than 1 (default length for the built-in is 14). This length should be calibrated depending on TF and asset. If done correctly, it can be a powerful tool for identifying swings. can be combined with any aggregation method. I recommend using with MA or cumulative aggregation methods. For conventional uses of , please read https://www.tradingview.com/wiki/Stochas...) and https://www.tradingview.com/wiki/Stochas...).
Experimental Bar coloring Feature
There is an option to color bars depending on UMF's position relative to the signal line. If both TFs are used in coloring and they are in disagreement, the TF with greater histogram height wins. There are two shades of green and red. The darker shade means both TFs agree. If you use the signal line, bar coloring can help with calibrating the indicator (play with parameters until you see a good looking chart i.e. a lot of green candles followed by a lot of red candles in a row). Please note that bar colors might change until candle(s) close(s). The bar coloring rules will most likely change in the future.
- Uncheck "Factor Price" for Bitmex or any other exchange that shows in terms of money.
- UMF is a replacement to ADP, ADMF and ADL, so no more updates for the old indicators!
- length N = length 2*N-1
- Combined tickers, e.g. (COINBASE:BTCUSD+BITSTAMP:BTCUSD+KRAKEN:XBTUSD)/3, can mitigate inconsistency issues between different exchanges (I recommend not mixing USD and USDT pairs together)
Why invent a new indicator
I have spent a great deal of time to find the best equation that represents . Each of the well-known methods have a major flaw.
- Winner-take-all problem
, OBV and to some extent assign accumulation or distribution based on the direction of change in price. They don't account for the amount of change. That means the indicator does not differentiate between a full candle and a candle.
- Extreme divergence problem
Chaikin tried to avoid winner-take-all problem. However, he ended up with a solution that, in my opinion, is even worse. A big flaw of Chaikin's indicators is that they can diverge too much from price. Most responsive indicators in this class, require at least two candles to diverge from price, but CMF/ADL can diverge in a single candle. Chaikin used the same component (aka Chaikin's multiplier) in both CMF and ADL. CMF's flaws may not be as visible because it is a normalized oscillator. However, this common flaw is more evident in accum/dist indicator which keeps all past information in its memory. As you can see in the chart below, accum/dist is constantly rising during an obviously distribution period.
ADV ( )
Please give a like, and share the interesting configurations you find in the comments.
- added safe signal cross similar to the feature in UMACD. This feature is useful to avoid trading during sideways. To use this feature, set the std deviation multiplier option to a number greater than 1.
- changed bar coloring mechanism when both TFs are enabled. Now colors change when both TFs agree, otherwise previous color will remain.
- added some visual cues for grouping settings in the UI
- added an inner band
I am curious to see your setups. Also, if you have suggestions for bar coloring. Your inputs are very valuable to me since you deeply understand indicators.