Category Volatility  Published on 28/07/2021

Market Facilitation Index

Description

Market Facilitation Index , by Bill Williams , plots the effectiveness of price movement by computing the price movement per volume unit.

Green :
---------------------------------
MFIndex increases and the volume increases. This means that the amount of participants entering the market increases, therefore the volume increases and the fresh incoming players align their positions in the direction of candlestick growth.

Fade(Brown) :
------------------------------
MFIndex falls and volume falls. It means that the market participants are indifferent and the price movement is small on small volumes. This usually happens at the end of a trend.

Fake(Blue) :
------------------------------
MFIndex increases, but the volume falls. It is highly likely that the market is being supported by broker speculation and not any significant client volume .

Squat(Pink) :
--------------------------------
MFIndex falls, but the volume increases. In this particular situation bulls and bears are fighting between themselves to see who will dominate the next trend. These battles are noticeable by the large sell and buy volumes. However, the price does not change appreciably since the strengths are equal. One of the competing parties either the buyers or the sellers will ultimately triumph in the battle. Usually, the fracture of such a candle indicates if this particular candle determines the continuation of the trend, or terminates the trend.

 


using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class MarketFacilitationIndex : Indicator
    {

        [Output("Green", Color = Colors.Lime, PlotType = PlotType.Histogram, Thickness = 4)]
        public IndicatorDataSeries green { get; set; }

        [Output("Fade", Color = Colors.Brown, PlotType = PlotType.Histogram, Thickness = 4)]
        public IndicatorDataSeries fade { get; set; }

        [Output("Fake", Color = Colors.Blue, PlotType = PlotType.Histogram, Thickness = 4)]
        public IndicatorDataSeries fake { get; set; }

        [Output("Squat", Color = Colors.Pink, PlotType = PlotType.Histogram, Thickness = 4)]
        public IndicatorDataSeries squat { get; set; }


        public IndicatorDataSeries hPrice, lPrice, volume;


        protected override void Initialize()
        {

            hPrice = CreateDataSeries();
            lPrice = CreateDataSeries();
            volume = CreateDataSeries();
        }

        public override void Calculate(int index)
        {

            hPrice[index] = Bars.HighPrices[index];
            lPrice[index] = Bars.LowPrices[index];
            volume[index] = Bars.TickVolumes[index];

            double mfi = (hPrice[index] - lPrice[index]) / volume[index];
            double pMfi = (hPrice[index - 1] - lPrice[index - 1]) / volume[index - 1];
            if ((mfi > pMfi) & (volume[index] > volume[index - 1]))
            {
                green[index] = 1;
                fade[index] = 0;
                fake[index] = 0;
                squat[index] = 0;
            }

            if ((mfi < pMfi) & (volume[index] < volume[index - 1]))
            {
                green[index] = 0;
                fade[index] = 1;
                fake[index] = 0;
                squat[index] = 0;

            }
            if ((mfi > pMfi) & (volume[index] < volume[index - 1]))
            {
                green[index] = 0;
                fade[index] = 0;
                fake[index] = 1;
                squat[index] = 0;

            }

            if ((mfi < pMfi) & (volume[index] > volume[index - 1]))
            {
                green[index] = 0;
                fade[index] = 0;
                fake[index] = 0;
                squat[index] = 1;

            }


        }
    }
}


KA
kaneida84

Joined on 25.04.2021

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Market Facilitation Index.algo
  • Rating: 0
  • Installs: 1361
  • Modified: 13/10/2021 09:54
Comments
Log in to add a comment.
No comments found.