[blackcat] L1 Markos Katsano Finite Volume Element

Background
If you use both an interday indicator (such as the OBV) and an intraday (such as Chaikin’s money flow or intraday intensity) you might have noticed that they sometimes move in opposite directions.
This is because intraday money flow indicators leave out all price action from the close to the next day’s open. This omission should not be ignored, since major news such as earnings announcements are usually released overnight. You can find examples of contradicting signals between the OBV and CMF in Markos Katsanos' April 2003 and July 2011 articles in S&C.
To reconcile both methods Markos Katsanos designed a money flow indicator which takes into account both intra and interday price action and presented it in the April 2003 issue of S&C. In designing the FVE, Markos Katsanos also introduced a volatility threshold that excludes minimal price changes.
Function
Markos Katsanos' article "Detecting Breakouts" described the calculation and use of a price-volume indicator called the finite volume element (FVE) in April, 2003. Katsanos provides a detailed Excel spreadsheet in the article, and I've used it to write the equivalent pine code for the FVE. I named this indicator "Markos Katsanos Finite Volume Element" indicator.
The FVE provides 2 types of signals:
The strongest signal is divergence between price and the indicator. Divergence can provide leading signals of breakouts or warnings of impending corrections. The classic method for detecting divergence is for FVE to make lower highs while price makes higher highs (negative divergence). An alternative method is to draw the linear regression line on both charts, and compare the slopes. A logical buy signal would be for FVE, diverging from price, to rise sharply and make a series higher highs and/or higher lows.
The indicator level is a unique and very important property of this indicator. Values above zero are bullish and indicate accumulation while values below zero indicate distribution. FVE crossing the zero line indicates that the short to intermediate balance of power is changing from the bulls to the bears or vice versa. The best scenario is when a stock is in the process of building a base, and FVE diverges from price and rises to cross the zero line from below, at a sharp angle. Conversely the crossing of the zero line from above is a bearish signal to liquidate positions or initiate a short trade.
Inputs
CutOff --> Cut Off Coefficient.
Samples --> Sample Periods.
Key Signal
FVE1 --> FVE fast signal
FVE2 --> FVE slow signal
Remarks
This is a Level 1 free and open source indicator.
Feedbacks are appreciated.
The [blackcat] L1 Markos Katsano Finite Volume Element LinReg script is a powerful tool designed for analyzing market trends using the concept of Finite Volume Elements (FVE). This indicator helps traders identify potential buy and sell signals by leveraging linear regression techniques applied to volume data. It provides clear visual cues through plots and labels on the chart, making it easier to spot trend reversals and divergences.
This script calculates two main FVE lines (fve1 and fve2) and uses them to determine crossover points that indicate long or short conditions. Additionally, it identifies various types of bullish and bearish divergences, which can be crucial for making informed trading decisions. The script also includes customizable inputs for fine-tuning the analysis according to individual preferences.
FEATURES
📊 Finite Volume Element Calculation: Uses a proprietary method to calculate FVE based on price action and volume.
🔄 Linear Regression Smoothing: Applies linear regression to smooth out the FVE values, reducing noise in the signal.
🎯 Crossover Signals: Identifies crossover points between fve1 and fve2 to generate buy/sell alerts.
🌟 Divergence Detection: Detects regular and hidden bullish/bearish divergences for enhanced trend analysis.
🛠️ Customizable Inputs:
Cutoff Threshold: Adjusts the sensitivity of the FVE calculation.
Sample Size: Determines the number of bars used in the FVE calculation.
Linear Regression Length: Sets the period for the linear regression smoothing.
Pivot Lookback Settings: Customizes the lookback periods for detecting pivots.
Plot Options: Enables/disables plotting of different divergence types.
HOW TO USE
Add the script to your TradingView chart.
Configure the input parameters as needed:
Set the desired cutoff threshold, sample size, and linear regression length.
Adjust the pivot lookback settings and enable/disable specific divergence plots.
Observe the plotted fve1 and fve2 lines along with their crossovers and divergences.
Use the generated alerts for potential entry/exit points in your trades.
LIMITATIONS
The effectiveness of this indicator depends heavily on the chosen input parameters.
Like all technical indicators, it should not be used in isolation but rather in conjunction with other forms of analysis.
Backtesting results may vary depending on the asset and timeframe being analyzed.
NOTES
Ensure you understand the underlying principles of Finite Volume Elements before relying solely on this indicator.
Always test any strategy thoroughly in a demo environment before applying it to live trading.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Bir grafik üzerinde hızlı erişim için bu komut dosyasını favorilerinize ekleyin — daha fazla bilgi burada.
Feragatname
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Bir grafik üzerinde hızlı erişim için bu komut dosyasını favorilerinize ekleyin — daha fazla bilgi burada.