Category Oscilators  Published on 18/09/2016

Cyf_Elder's_Force_Index

Description

Developed by Alexander Elder 

The Force Index combines volume with price to discover the force of bulls or bears behind every rally or decline

Force Index brings together three essential pieces of information :

  *the direction of price change

  *its extent

  *the volume during that change

Force Index provides a practical way of using volume for making trading decisions.

 

Force Index can be plotted as a Line (usually the EMA period is 2) Or Histogram (usually the EMA period is 13)

Force Index (Histogram & 13 EMA)

Force Index Divergence 

Elder Provides a complete description of how to use this indicator in his book "Trading for a Living" 


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

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewIndicator : Indicator
    {
        private IndicatorDataSeries FI;
        private ExponentialMovingAverage EMA;


        [Parameter("(Y)Line/(N)Histogram", DefaultValue = true)]
        public bool shape { get; set; }

        [Parameter("EMA_Period", DefaultValue = 2)]
        public int EMA_Period { get; set; }

        [Output("FI_Line", PlotType = PlotType.Line)]
        public IndicatorDataSeries FI_Line { get; set; }

        [Output("FI_HistUp", PlotType = PlotType.Histogram, Thickness = 3, Color = Colors.White)]
        public IndicatorDataSeries FI_H_Up { get; set; }

        [Output("FI_HistDn", PlotType = PlotType.Histogram, Thickness = 3, Color = Colors.DodgerBlue)]
        public IndicatorDataSeries FI_H_Dn { get; set; }

        protected override void Initialize()
        {
            FI = CreateDataSeries();
            EMA = Indicators.ExponentialMovingAverage(FI, EMA_Period);
        }

        public override void Calculate(int index)
        {
            FI_Line[index] = double.NaN;
            FI_H_Up[index] = double.NaN;
            FI_H_Dn[index] = double.NaN;

            FI[index] = (MarketSeries.Close[index] - MarketSeries.Close[index - 1]) * MarketSeries.TickVolume[index];
            if (shape)
            {
                FI_Line[index] = EMA.Result[index] / MarketSeries.Close[index];
            }
            else
            {
                if (EMA.Result[index] > 0)
                {
                    FI_H_Up[index] = EMA.Result[index] / MarketSeries.Close[index];
                }
                else if (EMA.Result[index] < 0)
                {
                    FI_H_Dn[index] = EMA.Result[index] / MarketSeries.Close[index];
                }

            }



        }
    }
}


cyfer's avatar
cyfer

Joined on 27.09.2015

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Cyf_Elder's_Force_Index.algo
  • Rating: 0
  • Installs: 3417
Comments
Log in to add a comment.
CI
ciripa · 4 years ago

It happens, that I'm just reading the PDF Book "Trading for a Living", which is for free in the

https://b-ok.global/book/683317/b3f441https://b-ok.global/book/683317/b3f441

plus "Come Into My Trading Room" and "The New Trading for A Living" by Dr. Alexander Elder. I was wondering, how to get these indicatorors and like a miracle, here they are.

I very much appreciate the sharing of these indicators with the ctrader community.

Great.

SK
Skn_17 · 5 years ago

Thank you for this great indicator. Any chance of you uploading your version of the squeeze indicator you showed in the picture?