DirectionalMovementSystem


Summary

The Directional Movement System is composed of three indicators that show if the market is trending and provide signals.

Syntax

public DirectionalMovementSystem DirectionalMovementSystem(int periods)
public DirectionalMovementSystem DirectionalMovementSystem(MarketSeries marketSeries, int periods)

Parameters

NameDescription

Example 1

private DirectionalMovementSystem _dms;
private double _dIplus;
private double _dIminus;
[Parameter("ADX Period", DefaultValue = 14)]
public int Period { get; set; }
 
protected override void OnStart()
{
    _dms = Indicators.DirectionalMovementSystem(Period);
}
protected override void OnTick()
{
    _dIplus = _dms.DIPlus.LastValue;
    _dIminus = _dms.DIMinus.LastValue;
    if (_dIminus > _dIplus)
    {
        // Do something
    }
    //...
}