Morogan

Improved Chaikin Money Flow

Morogan Güncellendi   
Chaikin Money Flow is a well-known Indicator for gauging buying/selling pressure. Marc Chaikin intended this to be used on the daily timeframe to capture the behavior of price action at or near the daily close when larger-scale actors influence the market. The calculation is straight forward as described within the built-in TradingView "CMF" indicator:

1. Period Money Flow Multiplier = ((Close - Low) - (High - Close)) /(High - Low)

2. Period Money Flow Volume = Period Money Flow Multiplier x Volume for the Period

3. Chaikin Money Flow = 21 Period Sum of Money Flow Volume / 21 Period Sum of Volume

There is, however, a problem with this algorithm: it does not account for daily gaps in price action. This leads to the indicator sometimes moving out-of-sync with price action and/or an under-emphasis of the magnitude change of the indicator relative to the change in price action. This is a significant problem for someone trying to read divergences against an underlying.

Note: I have never seen a published attempt to improve this indicator which is why I decided that there had to be a way to do it.

In order to mitigate this issue, I have taken the basic script provided by TradingView and made a key modification. If the open of a candle is outside the range of the previous candle, then the close of the previous candle is used as the "high" for the current candle (in the case of a gap down) or the "low" for the current candle (in the case of a gap up). However, if the close of the current candle exceeds the previous close, highs and lows for the current candle are calculated as normal. I believe this accounts for gaps in price action without significantly altering the original intent of the indicator.

I have made four other minor tweaks:

1. Default style is color coded area above and below the Zero Line
2. Range scaled to +/-100 instead of +/-1 (displays better on graph)
3. Set timeframe to Daily (as that is the timeframe for which this indicator was intended by Chaikin)
4. Length defaults to 21 (which is what Chaikin uses)
Sürüm Notları:
Updated to reflect a change that has been made to the original Tradingview CMF script upon which this improved script is based. The change accounts for a rare boundary condition in price data.
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?