[blackcat] L1 Markos Katsano Finite Volume ElementLevel: 1
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.
FVE
Combo Backtest 123 Reversal & Finite Volume Elements (FVE) This is combo strategies for get a cumulative signal. 
 First strategy
 This System was created from the Book "How I Tripled My Money In The 
 Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
 The strategy buys at market, if close price is higher than the previous close 
 during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50. 
 The strategy sells at market, if close price is lower than the previous close price 
 during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
 Second strategy
 The FVE is a pure volume indicator. Unlike most of the other indicators 
 (except OBV), price change doesn?t come into the equation for the FVE (price 
 is not multiplied by volume), but is only used to determine whether money is 
 flowing in or out of the stock. This is contrary to the current trend in the 
 design of modern money flow indicators. The author decided against a price-volume 
 indicator for the following reasons:
 - A pure volume indicator has more power to contradict.
 - The number of buyers or sellers (which is assessed by volume) will be the same, 
     regardless of the price fluctuation.
 - Price-volume indicators tend to spike excessively at breakouts or breakdowns.
 WARNING:
 - For purpose educate only
 - This script to change bars colors.
Combo Strategy 123 Reversal & Finite Volume Elements (FVE) This is combo strategies for get a cumulative signal. 
 First strategy
 This System was created from the Book "How I Tripled My Money In The 
 Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
 The strategy buys at market, if close price is higher than the previous close 
 during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50. 
 The strategy sells at market, if close price is lower than the previous close price 
 during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
 Second strategy
 The FVE is a pure volume indicator. Unlike most of the other indicators 
 (except OBV), price change doesn`t come into the equation for the FVE (price 
 is not multiplied by volume), but is only used to determine whether money is 
 flowing in or out of the stock. This is contrary to the current trend in the 
 design of modern money flow indicators. The author decided against a price-volume 
 indicator for the following reasons:
 - A pure volume indicator has more power to contradict.
 - The number of buyers or sellers (which is assessed by volume) will be the same, 
     regardless of the price fluctuation.
 - Price-volume indicators tend to spike excessively at breakouts or breakdowns.
 WARNING:
 - For purpose educate only
 - This script to change bars colors.
FVE - Finite Volume Elements [UTS]FVE is a money flow indicator but with two important differences from existing money flow indicators:
It resolves contradictions between intraday money flow indicators (such as Chaikin’s money flow) and interday money flow indicators (like On Balance Volume) by taking into account both intra- and interday price action.
Unlike other money flow indicators which add or subtract all volume even if the security closed just 1 cent higher than the previous close, FVE uses a volatility threshold to take into account minimal price changes.
 General Usage 
The FVE provides 3 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 most obvious and coincident signal is the slope of the FVE line. An upward slope indicates that the bulls are in control and the opposite for downward.
This 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.
 Trend Visualisation 
Optional: If the trend direction is  DOWN  the moving average is painted red. If the trend direction is  UP  the moving average is painted in green.
If the movement is  FLAT  then the color is grey.
 Moving Averages 
Five different types of Moving Averages are available for both FVE and the optional moving average of the FVE.
 
  ALMA (Arnaud Legoux Moving Average)
  Average Value
  EMA  (Exponential Moving Average)
  SMA  (Simple Moving Average)
  WMA  (Weighted Moving Average)
 
 Calculation Methods 
Since Markos Katsanos presented the first version of the FVE in April 2003. 
Since then there have been various adaptions and improvements on this indicator. 
The following are choosable for calculating the FVE:
 
  Thinkscript  usethinkscript.com
  Linnsoft  www.linnsoft.com
  Volatility Adapted  traders.com
Finite Volume Elements (FVE) Backtest The FVE is a pure volume indicator. Unlike most of the other indicators 
 (except OBV), price change doesn?t come into the equation for the FVE (price 
 is not multiplied by volume), but is only used to determine whether money is 
 flowing in or out of the stock. This is contrary to the current trend in the 
 design of modern money flow indicators. The author decided against a price-volume 
 indicator for the following reasons:
 - A pure volume indicator has more power to contradict.
 - The number of buyers or sellers (which is assessed by volume) will be the same, 
     regardless of the price fluctuation.
 - Price-volume indicators tend to spike excessively at breakouts or breakdowns.
 You can change long to short in the Input Settings
 WARNING:
 - For purpose educate only
 - This script to change bars colors.
Finite Volume Elements (FVE) Strategy The FVE is a pure volume indicator. Unlike most of the other indicators 
 (except OBV), price change doesn?t come into the equation for the FVE (price 
 is not multiplied by volume), but is only used to determine whether money is 
 flowing in or out of the stock. This is contrary to the current trend in the 
 design of modern money flow indicators. The author decided against a price-volume 
 indicator for the following reasons:
 - A pure volume indicator has more power to contradict.
 - The number of buyers or sellers (which is assessed by volume) will be the same, 
     regardless of the price fluctuation.
 - Price-volume indicators tend to spike excessively at breakouts or breakdowns.
 WARNING:
  - This script to change bars colors.
FVE Volatility color-coded Volume bar    The FVE is a pure volume indicator. Unlike most of the other indicators 
    (except OBV), price change doesn?t come into the equation for the FVE 
    (price is not multiplied by volume), but is only used to determine whether 
    money is flowing in or out of the stock. This is contrary to the current trend 
    in the design of modern money flow indicators. The author decided against a 
    price-volume indicator for the following reasons:
    - A pure volume indicator has more power to contradict.
    - The number of buyers or sellers (which is assessed by volume) will be the same, 
    regardless of the price fluctuation.
    - Price-volume indicators tend to spike excessively at breakouts or breakdowns.
    This study is an addition to FVE indicator. Indicator plots different-coloured volume 
    bars depending on volatility.     
FVE (Volatility Modified)    This is another version of FVE indicator that we have posted earlier 
    in this forum.
    This version has an important enhancement to the previous one that`s 
    especially useful with intraday minute charts.
    Due to the volatility had not been taken into account to avoid the extra 
    complication in the formula, the previous formula has some drawbacks:
    The main drawback is that the constant cutoff coefficient will overestimate 
    price changes in minute charts and underestimate corresponding changes in 
    weekly or monthly charts.
    And now the indicator uses adaptive cutoff coefficient which will adjust to 
    all time frames automatically.
Finite Volume Elements (FVE)    The FVE is a pure volume indicator. Unlike most of the other indicators 
    (except OBV), price change doesn`t come into the equation for the FVE (price 
    is not multiplied by volume), but is only used to determine whether money is 
    flowing in or out of the stock. This is contrary to the current trend in the 
    design of modern money flow indicators. The author decided against a price-volume 
    indicator for the following reasons:
    - A pure volume indicator has more power to contradict.
    - The number of buyers or sellers (which is assessed by volume) will be the same, 
        regardless of the price fluctuation.
    - Price-volume indicators tend to spike excessively at breakouts or breakdowns.








