CMF and Scaled EFI OverlayCMF and Scaled EFI Overlay Indicator
Overview
The CMF and Scaled EFI Overlay indicator combines the Chaikin Money Flow (CMF) and a scaled version of the Elder Force Index (EFI) into a single chart. This allows traders to analyze both indicators simultaneously, facilitating better insights into market momentum and volume dynamics , specifically focusing on buying/selling pressure and momentum , without compromising the integrity of either indicator.
Purpose
Chaikin Money Flow (CMF): Measures buying and selling pressure by evaluating price and volume over a specified period. It indicates accumulation (buying pressure) when values are positive and distribution (selling pressure) when values are negative.
Elder Force Index (EFI): Combines price changes and volume to assess the momentum behind market moves. Positive values indicate upward momentum (prices rising with strong volume), while negative values indicate downward momentum (prices falling with strong volume).
By scaling the EFI to match the amplitude of the CMF, this indicator enables a direct comparison between pressure and momentum , preserving their shapes and zero crossings. Traders can observe the relationship between price movements, volume, and momentum more effectively, aiding in decision-making.
Understanding Pressure vs. Momentum
Chaikin Money Flow (CMF):
- Indicates the level of demand (buying pressure) or supply (selling pressure) in the market based on volume and price movements.
- Accumulation: When institutional or large investors are buying significant amounts of an asset, leading to an increase in buying pressure.
- Distribution: When these investors are selling off their holdings, increasing selling pressure.
Elder Force Index (EFI):
- Measures the strength and speed of price movements, indicating how forceful the current trend is.
- Positive Momentum: Prices are rising quickly, indicating a strong uptrend.
- Negative Momentum: Prices are falling rapidly, indicating a strong downtrend.
Understanding the difference between pressure and momentum is crucial. For example, a market may exhibit strong buying pressure (positive CMF) but weak momentum (low EFI), suggesting accumulation without significant price movement yet.
Features
Overlay of CMF and Scaled EFI: Both indicators are plotted on the same chart for easy comparison of pressure and momentum dynamics.
Customizable Parameters: Adjust lengths for CMF and EFI calculations and fine-tune the scaling factor for optimal alignment.
Preserved Indicator Integrity: The scaling method preserves the shape and zero crossings of the EFI, ensuring accurate analysis.
How It Works
CMF Calculation:
- Calculates the Money Flow Multiplier (MFM) and Money Flow Volume (MFV) to assess buying and selling pressure.
- CMF is computed by summing the MFV over the specified length and dividing by the sum of volume over the same period:
CMF = (Sum of MFV over n periods) / (Sum of Volume over n periods)
EFI Calculation:
- Calculates the EFI using the Exponential Moving Average (EMA) of the price change multiplied by volume:
EFI = EMA(n, Change in Close * Volume)
Scaling the EFI:
- The EFI is scaled by multiplying it with a user-defined scaling factor to match the CMF's amplitude.
Plotting:
- Both the CMF and the scaled EFI are plotted on the same chart.
- A zero line is included for reference, aiding in identifying crossovers and divergences.
Indicator Settings
Inputs
CMF Length (`cmf_length`):
- Default: 20
- Description: The number of periods over which the CMF is calculated. A higher value smooths the indicator but may delay signals.
EFI Length (`efi_length`):
- Default: 13
- Description: The EMA length for the EFI calculation. Adjusting this value affects the sensitivity of the EFI to price changes.
EFI Scaling Factor (`efi_scaling_factor`):
- Default: 0.000001
- Description: A constant used to scale the EFI to match the CMF's amplitude. Fine-tuning this value ensures the indicators align visually.
How to Adjust the EFI Scaling Factor
Start with the Default Value:
- Begin with the default scaling factor of `0.000001`.
Visual Inspection:
- Observe the plotted indicators. If the EFI appears too large or small compared to the CMF, proceed to adjust the scaling factor.
Fine-Tune the Scaling Factor:
- Increase or decrease the scaling factor incrementally (e.g., `0.000005`, `0.00001`, `0.00005`) until the amplitudes of the CMF and EFI visually align.
- The optimal scaling factor may vary depending on the asset and timeframe.
Verify Alignment:
- Ensure that the scaled EFI preserves the shape and zero crossings of the original EFI.
- Overlay the original EFI (if desired) to confirm alignment.
How to Use the Indicator
Analyze Buying/Selling Pressure and Momentum:
- Positive CMF (>0): Indicates accumulation (buying pressure).
- Negative CMF (<0): Indicates distribution (selling pressure).
- Positive EFI: Indicates positive momentum (prices rising with strong volume).
- Negative EFI: Indicates negative momentum (prices falling with strong volume).
Look for Indicator Alignment:
- Both CMF and EFI Positive:
- Suggests strong bullish conditions with both buying pressure and upward momentum.
- Both CMF and EFI Negative:
- Indicates strong bearish conditions with selling pressure and downward momentum.
Identify Divergences:
- CMF Positive, EFI Negative:
- Buying pressure exists, but momentum is negative; potential for a bullish reversal if momentum shifts.
- CMF Negative, EFI Positive:
- Selling pressure exists despite rising prices; caution advised as it may indicate a potential bearish reversal.
Confirm Signals with Other Analysis:
- Use this indicator in conjunction with other technical analysis tools (e.g., trend lines, support/resistance levels) to confirm trading decisions.
Example Usage
Scenario 1: Bullish Alignment
- CMF Positive: Indicates accumulation (buying pressure).
- EFI Positive and Increasing: Shows strengthening upward momentum.
- Interpretation:
- Strong bullish signal suggesting that buyers are active, and the price is likely to continue rising.
- Action:
- Consider entering a long position or adding to existing ones.
Scenario 2: Bearish Divergence
- CMF Negative: Indicates distribution (selling pressure).
- EFI Positive but Decreasing: Momentum is positive but weakening.
- Interpretation:
- Potential bearish reversal; price may be rising but underlying selling pressure suggests caution.
- Action:
- Be cautious with long positions; consider tightening stop-losses or preparing for a possible trend reversal.
Tips
Adjust for Different Assets:
- The optimal scaling factor may differ across assets due to varying price and volume characteristics.
- Always adjust the scaling factor when analyzing a new asset.
Monitor Indicator Crossovers:
- Crossings above or below the zero line can signal potential trend changes.
Watch for Divergences:
- Divergences between the CMF and EFI can provide early warning signs of trend reversals.
Combine with Other Indicators:
- Enhance your analysis by combining this overlay with other indicators like moving averages, RSI, or Ichimoku Cloud.
Limitations
Scaling Factor Sensitivity:
- An incorrect scaling factor may misalign the indicators, leading to inaccurate interpretations.
- Regular adjustments may be necessary when switching between different assets or timeframes.
Not a Standalone Indicator:
- Should be used as part of a comprehensive trading strategy.
- Always consider other market factors and indicators before making trading decisions.
Disclaimer
No Guarantee of Performance:
- Past performance is not indicative of future results.
- Trading involves risk, and losses can exceed deposits.
Use at Your Own Risk:
- This indicator is provided for educational purposes.
- The author is not responsible for any financial losses incurred while using this indicator.
Code Summary
//@version=5
indicator(title="CMF and Scaled EFI Overlay", shorttitle="CMF & Scaled EFI", overlay=false)
cmf_length = input.int(20, minval=1, title="CMF Length")
efi_length = input.int(13, minval=1, title="EFI Length")
efi_scaling_factor = input.float(0.000001, title="EFI Scaling Factor", minval=0.0, step=0.000001)
// --- CMF Calculation ---
ad = high != low ? ((2 * close - low - high) / (high - low)) * volume : 0
mf = math.sum(ad, cmf_length) / math.sum(volume, cmf_length)
// --- EFI Calculation ---
efi_raw = ta.ema(ta.change(close) * volume, efi_length)
// --- Scale EFI ---
efi_scaled = efi_raw * efi_scaling_factor
// --- Plotting ---
plot(mf, color=color.green, title="CMF", linewidth=2)
plot(efi_scaled, color=color.red, title="EFI (Scaled)", linewidth=2)
hline(0, color=color.gray, title="Zero Line", linestyle=hline.style_dashed)
- Lines 4-6: Define input parameters for CMF length, EFI length, and EFI scaling factor.
- Lines 9-11: Calculate the CMF.
- Lines 14-16: Calculate the EFI.
- Line 19: Scale the EFI by the scaling factor.
- Lines 22-24: Plot the CMF, scaled EFI, and zero line.
Feedback and Support
Suggestions: If you have ideas for improvements or additional features, please share your feedback.
Support: For assistance or questions regarding this indicator, feel free to contact the author through TradingView.
---
By combining the CMF and scaled EFI into a single overlay, this indicator provides a powerful tool for traders to analyze market dynamics more comprehensively. Adjust the parameters to suit your trading style, and always practice sound risk management.
Chaikin_money_flow
YD_Divergence_RSI+CMFThe ‘YD_Divergence_RSI+CMF’ indicator can find divergence using RSI (Relative Strength Index) and CMF (Chaikin Money Flow) indicators.
📌 Key functions
1. Search pivot high and pivot low points in a certain length of price.
2. Connect pivot high to pivot high , pivot low to pivot low , forming two standards for divergence in result.
The marker then plots only the higher high, lower low lines.
(higher low and lower high in prices are referred to hidden divergence, which are not considered in this indicator)
3. Compare the two standards with RSI and CMF indicators, send an alert if there is a divergence. As a result, the indicator will find four combination of divergence.
A. Higher high price / Lower RSI (Bearish RSI Divergence)
B. Lower low price / Higher RSI (Bullish RSI Divergence)
C. Higher high price / Lower CMF (Bearish CMF Divergence)
D. Lower low price / Higher CMF (Bullish CMF Divergence)
📌 Details
Developing the indicators, we put a lot of effort in making a customizable and user-friendly interface.
#1. Pivot Setting
Users can set the length to find the pivot high / pivot low in ‘Pivot Settings – Pivot Length.’
Increased pivot Length takes more candles to interpret the chart but reduce false signals since the it uses only the most certain pivot high / pivot low values. Obviously, decreased pivot length will act the opposite.
Users can choose whether to use ‘High/Low’ or ‘Close’ in ‘Pivot Reference’ to set the swing point of prices.
Users can also choose whether to display the pivot high / pivot low marker on the chart.
#2 RSI & CMF Settings
Users can adjust the length of RSI & CMF separately. (The default values are set to 14 and 20 each.)
#3 Label Setting
Users can adjust the text displayed on the chart label. (The default values is set to ‘Bullish / Bearish’, ‘RSI/CMF’, ‘Divergence’.)
Users can reduce the length of text label or simply turn the label off. Just click the ‘Bull/Bear’ or ‘None’ button. ‘Divergence’ works the same.
Users can decide whether to display the ‘Divergence Line and Label’, set custom settings for the label and line. (color, thickness, style, etc)
📌 Alert
Alert are provided as a combination of the chart's symbol and the set label text. For example,
‘BINANCE:BTCUSDT.P, Bullish RSI Divergence’
====================================================
"YD_Divergence_RSI+CMF" 지표 는 RSI와 CMF 지표를 이용해서 Divergence 를 찾아낼 수 있습니다.
📌 주요 기능
1. 정해진 가격 움직임 안에서 pivot high와 pivot low 포인트 를 찾아냅니다.
2. Pivot high로만 이어진 라인과, Pivot low로만 이어진 두 라인을 작도한 뒤 divergence의 기준으로 삼습니다.
이 지표에서는 normal divergence만 사용하기 때문에 차트에 higher high와 lower low만 표기 합니다.
(higher low와 lower high는 hidden divergence로 정의되며, 이 지표에서는 다루지 않습니다.
3. 두 기준선과 RSI, CMF 지표를 각각 비교하고, 결과적으로 4개의 조합을 구할 수 있습니다.
A. Higher high price / Lower RSI (Bearish RSI Divergence)
B. Lower low price / Higher RSI (Bullish RSI Divergence)
C. Higher high price / Lower CMF (Bearish CMF Divergence)
D. Lower low price / Higher CMF (Bullish CMF Divergence)
📌 세부 사항
지표를 개발하며 사용자들이 원하는 방향으로 지표를 설정할 수 있게 작업에 많은 공을 들였습니다. 굉장히 다양한 옵션을 선택할 수 있으며, 원하는 방식으로 지표를 사용할 수 있습니다.
#1 Pivot Setting
Pivot setting에서는 Pivot Length를 변경할 수 있습니다.
Pivot Length를 늘릴 경우, 보다 확실한 Swing High와 Swing Low만을 사용하게 되므로, False signal이 줄어들 수 있습니다. 하지만 Swing High/ Low를 판정하는 데에 더 긴 시간이 걸리게 되므로, Signal이 다소 늦게 발생하는 단점이 생기게 됩니다.
Pivot Length를 줄일 경우, 반대로 Swing High/Low의 판정이 더 빨리 일어나기 때문에, Signal을 거래에 이용하기는 좋을 수 있습니다. 다만, Swing High와 Low가 훨씬 더 잦은 빈도로 발생하기 때문에 False Signal을 줄 가능성이 높아집니다.
Pivot Reference에서는 가격의 Swing Point를 설정함에 있어, High/Low(고가/저가)를 이용할 지 Close (종가)를 이용할 지 선택할 수 있습니다.
Pivot High/Low Marker를 선택할 경우 Pivot High/ Low에 Marker가 찍히게 됩니다.
#2 RSI와 CMF Setting
RSI와 CMF Setting에서는 RSI와 CMF의 길이를 각각 설정할 수 있습니다. 기본값은 14와 20으로 설정되어 있습니다.
#3 Label Setting
Label Setting에서는 Label에 표시되는 글자를 선택할 수 있습니다.
기본값은 "Bullish / Bearish", "RSI/CMF", "Divergence"로 선택되어 있으며, 너무 길다고 느껴질 경우 "Bull/Bear" 혹은 "None"을 클릭하여 길이를 줄일 수 있습니다. 마찬가지로 Divergence의 경우도 생략이 가능합니다.
하단에서는 Divergence Line과 Label을 켜고 끌 수 있으며, 선의 색깔, 굵기, 종류, 그리고 Label의 색깔, 크기, 종류를 선택할 수 있습니다. Label의 Text 색 역시 변경이 가능합니다.
📌 얼러트
얼러트는 자신이 설정한 차트의 심볼과 Label의 문구의 조합으로 제공되며 예를 들면 다음과 같습니다.
"BINANCE:BTCUSDT.P, Bullish RSI Divergence"
Ultimate Volume Custom ScreenerThis indicator will allow you to make your custom volume TradingView screener without coding. Add it to the chart, and select up to 40 symbols and up to five indicators. The screener will do the rest for you. The indicator will form a lovely table with all values and highlighted signals. It allows also to filter symbols based on the values of indicators and sends results as an alert.
The screener is highly customizable, and you can choose its position on the chart, sorting, order of the columns, colors for the tables, and all signals separately. You can easily change parameters for all supported indicators.
Supported indicators
Currently, there are 15 different custom indicators available. Current list of indicators:
Accumulation/Distribution (Acm/Dst)
Chaikin Money Flow (CMF)
Ease of Movement (EOM)
Klinger Oscillator (KO)
Money Flow Index (MFI)
Negative Volume Index (NVI)
On Balance Volume (OBV)
Positive Volume Index (PVI)
Price
Price-Volume Trend (PVT)
Volume
Volume MA (VMA)
Volume Percentile (V-Prct)
Volume RSI (V-RSI)
Volume Weighted Average Price (VWAP)
We're already working on adding a few more supported indicators. If you have any ideas about the indicators you want to see in our screener, contact us, and we'll consider them.
Filters
You can combine up to 5 filters on all selected indicators.
This will split the screen table into two parts. The top one will contain symbols that satisfy all conditions:
Alerts
You can also create an alert and receive a filtered symbol at the end of every bar.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Adaptive Fisherized CMFIntroduction
Heyo, here I made a normalized Chaikin Money Flow (CMF) indicator with Inverse Fisher Transform (IFT) and some smoothing techniques.
I had to normalize the indicator in order to fit it to the IFT range (-1 -> 1).
Moreover, the good old adaptive mode is also included in this indicator. It uses Ehlers superb dominant cycle techniques.
It also has divergence detection, several options for individualisation and doesn't repaint.
Usage
www.investopedia.com
Signals
CMF above 0 => bullish market
CMF below 0 => bearish market
(You can also use the inner bands instead of the zero line, to make these signals more precise)
Bullish regular/hidden divergence => long
Bearish regular/hidden divergence => short
Enjoy guys!
PS: I really would like to hear some feedback of you.
Standardized Chaikin OscillatorThis strategy is mainly designed based on Chaikin Oscillator.
The problems with the Chaikin Oscillator is that it's value varies greatly depending on the symbol.
Even for the same symbol, it will vary greatly depending on the volume changed.
To solve the problem, this strategy keeps the values of the indicators consistent in a standardized way, so that entry and exit signals can be generated.
Since this strategy refers to the trading volume, it is more suitable for exchanges with large trading volume.
The default parameters are recommended to use BTCUSDT on Binance in 1hour timeframe, but you also can try the suitable parameters on your own symbol and timeframe.
Enjoy it!
Chaikin Money Flow - LibraryLibrary "Chaikin Money Flow"
cmf()
Developed by Marc Chaikin, Chaikin Money Flow measures the amount of Money Flow Volume over a specific period.
Money Flow Volume forms the basis for the Accumulation Distribution Line. Instead of a cumulative total of
Money Flow Volume, Chaikin Money Flow simply sums Money Flow Volume for a specific look-back period, typically
20 or 21 days. The resulting indicator fluctuates above/below the zero line just like an oscillator. Chartists
weigh the balance of buying or selling pressure with the absolute level of Chaikin Money Flow. Chartists can
also look for crosses above or below the zero line to identify changes on money flow.
The Accumulation Distribution Line was developed by Marc Chaikin to measure the cumulative flow of money into and
out of an index or security. The Accumulation/Distribution Line can be compared to the OBV (On Balance Volume),
which adds or subtracts volume depending on the closing price. Marc Chaikin chose a different approach, instead
of relying on the closing price, he used CLV (Close Location Value).
Aggregated Chaikin Money Flow - InFinitoModified Version of In-Built Chaikin Money Flow Indicator. Aggregated Volume is used for it's calculation + a couple of other features.
Aggregation code originally from Crypt0rus
***The indicator can be used for any coin/symbol to aggregate volume , but it has to be set up manually***
***The indicator can be used with specific symbol data only by disabling the aggregation option, which allows for it to be used on any symbol***
- Calculated based on Aggregated Volume instead of by symbol volume. Using aggregated data makes it more accurate and allows to compare volume flow between different kinds of markets (Spot, Futures , Perpetuals, Futures+Perpetuals and All Volume ).
- As well, in order to make the data as accurate as possible, the data from each exchange aggregated is normalized to report always in terms of 1 BTC. In case this indicator is used for another symbol, the calculations can be adjusted manually to make it always report data in terms of 1 contract/coin.
- Added Moving Average ( SMA , EMA , WMA , RMA, VWMA) that can be plotted to the CMF
- Changed 0 line to a small range which tends to be more relevant than the 0 line. This range can be manually modified
Things to look for:
- Divergences: Can be a very good reversal signal
- MA crossovers: Can be a very good confluent Buy/Sell signal
- Center range retests: CMF is normally defined as bullish above 0 and bearish below 0. In this case it is above or below the middle range. Even if the start of the move was missed. The retest of the middle range can give very good entries.
- Confluence of the latter
+ Breadth & Volumenote* If you've used my "+ Rate of Change Indicator", I am updating that without the OBV, which has been moved here. Just an FYI.
This "indicator" is basically a variety of indicators that measure volume, or accumulation/distribution. There's a bit of a story about how this came about but
it's not that interesting, so I'll spare you.
Indicators from which you may choose here are On Balance Volume (OBV), Money Flow Index (MFI), Chaikin Money Flow (CMF), Chaikin Oscillator, and Positive & Negative Net Volume.
I'll give a brief overview of these below, and if you want to educate yourself further on them you may. There are many web resources for that.
Most people are probably familiar with OBV. It's one of the more commonly used volume indicators, especially in the crypto crowd (at least amongst those traders I follow). It's basically a cumulative (doesn't oscillate around a midpoint) momentum indicator that measures volume of the current period versus volume of the previous period and adds it if price closed higher, but subtracts it if price closes lower. It's another way of using volume to confirm trend.
The MFI is a momentum indicator that measures the flow of money into and out of an asset over some period of time (user input). It's calculated using the RSI, so it can be used similarly to RSI (divergences, overbought, oversold, etc.), but of course unlike the RSI it's calculated primarily using volume and comparing the most recent candle close to the previous one (similar to OBV).
CMF is a volume-weighted average of accumulation and distribution over a some period of time (typically 21). It's a way of measuring accumulation versus
distribution in an asset, and oscillates around a zero line. You would use it similarly to any other oscillator, in that you can look for divergences, and general positive or negative momentum.
Chaikin Oscillator is basically a MACD (without signal line) of the accumulation and distribution index (or line--which is somehow different than simply accumulation and distribution). I haven't looked into these differences deeply, but if you look below at the calculations, and substituted 'ad' for 'accdist' you get very different readings. I actually did that, and what it looks like it would do is turn the actual Oscillator into a MACD signal line. So, by substituting 'ad' for 'accdist' (or the accumulation/distribution index) you produce a signal line of the Chaikin Oscillator.
Anyway, all that confusion out of the way, as I said, it's a MACD on the accumulation and distribution index, therefore it is another zero line oscillator, and similarly to CMF, it's a way of measuring price movements in the chart versus a/d. The zero line isn't just any old zero line, however, it is actually the accumulation distribution line. I've made an OBV version of this by substituting the OBV for AD, so if you prefer OBV maybe you will like that.
Pos. & Neg Net Volume is actually an indicator I had seen made by RafaelZioni. It basically takes net volume, calculates a cumulative of that, then subtracts a moving average of some period from the cumulative net volume in order to create a volume oscillator. Use it like the other oscillators!
Added Donchian Channels, moving averages, Bollinger Bands, colored everything, and alerts.
Enjoy!
Below I will post images with the different indicators, everything on default settings (except for lookback period, which I have adjusted to my personal preferences).
Above is an image with the MFI being compared to the RSI since they are very similar (MFI being basically a volume derivative of the RSI).
Chaikin Money Flow set to lookback of 13. You could probably extend that a bit if you wanted to smooth the line more.
Chaikin Oscillator and Chaikin Oscillator of OBV, with a zoomed in look below, to see the differences more clearly.
CO and COBV closer look.
Positive & Negative Net Volume.
Cyclical Relative Volume + CMFThis Tool is built on the basis of the relative volume of the cycle in question, it can be set as desired.
It is present a background area that indicates whether operators are more likely to accumulate or distribute, again on the basis of cyclicalit.
We can set the% variation of the volumes above the average of the cycle
Hight Threshold highlights in red or green the histograms that exceed the cycle average by x%
Low Threshold highlights in orange the volumes that are less than x% above the cycle average
Finally, volumes below the cycle average will be highlighted.
This tool expresses its maximum in Breakout or Swing operations
The Breakout is purchased if the volumes are 25/50 % higher than the average of the cycle and if the CMF is in the accumulation phase
Instead, I buy the swing if the volumes are below the average of the cycle or around the Low Threshold threshold, if we are in a phase of strong accumulation or in the presence of a slight phase of Positive Money Flow Decrease
The CMF in accumulation / distribution is highlighted by the background color that can be set as desired based on the following parameters:
-Positive Money Flow Increase
-Positive Money Flow Decrease
-Negative Money Flow Decrease
-Negative Money Flow Increase
For any bugs contact the creators
Chaikin Money FlowThis script plots the original Chaikin Money Flow in addition of highlighting positive/negative pressure areas.