Category Other  Published on 10/10/2020

Building Block: IndiFilter

Description

 

Comes with source code.

The IndiFilter can be used to remove false signals from price movements, zero-cross indicators, or other dataseries.

There are four modes of filtering available:

  1. Keep a running total of changes, and once the total reaches a threshold – add it all on / take it off.
  2. Keep a running total, and add on / take off once one individual change clears the threshold.
  3. As in 1, but the threshold is dynamic, based off the standard deviation of the input series.
  4. As in 2, but with a dynamic threshold.

 

Inputs:

  • Source: Input series for filtering.
  • SD Period: The period used for calculating the standard deviation of the input series
  • SD Type: The moving average type to calculate the standard deviation.
  • SD Method: Yes – Threshold is based on the standard deviation; No – threshold is set by operator, and is static
  • Threshold / SD Value: The threshold value that the IndiFilter will ignore under (depending on mode). If SD Method is no, then the threshold represents raw units of the input series (eg. number of pips). If SD Method is yes, then the threshold is the number of standard deviations the series must exceed.
  • Mode: The type of filtering to be applied (see above).

 

Outputs:

  • Result: The result of the price filtering.

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

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

        protected override void Initialize()
        {
            // *** Requires no access rights *** 
            // Visit: https://fxtradersystems.com and search for IndiFilter
        }

        public override void Calculate(int index)
        {
            Chart.DrawStaticText("Availiability", "Visit: https://fxtradersystems.com and search for IndiFilter", VerticalAlignment.Bottom, HorizontalAlignment.Left, Color.LawnGreen);
        }
    }
}


fxtradersystems's avatar
fxtradersystems

Joined on 10.09.2020

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: DirectIndiFilter.algo
  • Rating: 0
  • Installs: 1136
Comments
Log in to add a comment.
No comments found.