Market Facilitation Index free

by kaneida84 in category Volatility at 28/07/2021
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.

 

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgocTrader
´╗┐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;

            }


        }
    }
}
Comments
0