Skip to content

IIndicatorsAccessor

Summary

Accessor to Indicators

Signature

1
public abstract interface IIndicatorsAccessor

Namespace

cAlgo.API.Internals

Methods

GetIndicator (3)

GetIndicator (1 of 3)

Summary

Initializes the custom indicator

Signature

1
public abstract TIndicator GetIndicator(object[] parameterValues)

Parameters

Name Type Description
parameterValues object[] The custom indicator parameters

Return Value

TIndicator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 private SampleSMA sma;
 protected override void Initialize()
 {
     sma = Indicators.GetIndicator<SampleSMA>(Source, Period);
 }
 public override void Calculate(int index)
 {
     // Display the sma result on the chart
     Result[index] = sma.Result[index];
 }

GetIndicator (2 of 3)

Summary

Initializes the custom indicator

Signature

1
public abstract TIndicator GetIndicator(Bars bars, object[] parameterValues)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
parameterValues object[] The custom indicator parameters

Return Value

TIndicator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 private SampleSMA sma;
 protected override void Initialize()
 {
     sma = Indicators.GetIndicator<SampleSMA>(Source, Period);
 }
 public override void Calculate(int index)
 {
     // Display the sma result on the chart
     Result[index] = sma.Result[index];
 }

GetIndicator (3 of 3)

Signature

1
public abstract TIndicator GetIndicator(MarketSeries marketSeries, object[] parameterValues)

Parameters

Name Type Description
marketSeries MarketSeries
parameterValues object[]

Return Value

TIndicator

MovingAverage

Summary

Moving Average indicators are used to smooth data producing trend indicators.

Signature

1
public abstract MovingAverage MovingAverage(DataSeries source, int periods, MovingAverageType maType)

Parameters

Name Type Description
source DataSeries The source data used for the MA calculation.
periods int The periods used in the calculation.
maType MovingAverageType Method of calculation of MA.

Return Value

MovingAverage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 private MovingAverage ma;
 protected override void Initialize()
 {
     ma = Indicators.MovingAverage(MarketSeries.Close, 50, MovingAverageType.Simple);
 }
 public override void Calculate(int index)
 {
     // Display the ma result on the chart
     Result[index] = ma.Result[index];
 }

ExponentialMovingAverage

Summary

The Exponential Moving Average smoothes the price data producing a trend indicator.

Signature

1
public abstract ExponentialMovingAverage ExponentialMovingAverage(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for the EMA calculation.
periods int The periods used in the calculation.

Return Value

ExponentialMovingAverage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 private ExponentialMovingAverage ema;
 protected override void Initialize()
 {
     ema = Indicators.ExponentialMovingAverage(MarketSeries.Close, 50);
 }
 public override void Calculate(int index)
 {
     // Display the ema result on the chart
     Result[index] = ema.Result[index];
 }

WeightedMovingAverage

Summary

The Weighted Moving Average smoothes the price data producing a trend indicator.

Signature

1
public abstract WeightedMovingAverage WeightedMovingAverage(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for WMA calculation.
periods int The periods used in the calculation.

Return Value

WeightedMovingAverage

Examples

1
2
3
4
5
6
7
8
9
 private WeigthedMovingAverage wma;
 protected override void Initialize()
 {
     wma = Indicators.WeightedMovingAverage(MarketSeries.Close, 20);
 }
 public override void Calculate(int index)
 {
     Result[index] = wma.Result[index];
 }

SimpleMovingAverage

Summary

The simple moving average smoothes the price data producing a trend indicator

Signature

1
public abstract SimpleMovingAverage SimpleMovingAverage(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for SMA calculation.
periods int The periods used in the calculation.

Return Value

SimpleMovingAverage

Examples

1
2
3
4
5
6
7
8
9
 private SimpleMovingAverage sma;
 protected override void Initialize()
 {
     sma = Indicators.SimpleMovingAverage(MarketSeries.Close, 14);
 }
 public override void Calculate(int index)
 {
     Result[index] = sma.Result[index];
 }

TriangularMovingAverage

Summary

The Triangular Moving Average is averaged twice to produce a double smoothed trend indicator

Signature

1
public abstract TriangularMovingAverage TriangularMovingAverage(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for TMA calculation.
periods int The periods used in the calculation.

Return Value

TriangularMovingAverage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 [Parameter]
 public DataSeries Source { get; set; }
 [Output("Result", Color = Colors.Orange)]
 public IndicatorDataSeries Result { get; set; }
 private SimpleMovingAverage tma;
 protected override void Initialize()
 {
     tma = Indicators.TriangularMovingAverage(Source, 10);
 }
 public override void Calculate(int index)
 {
     Result[index] = tma.Result[index];
 }

HighMinusLow (3)

HighMinusLow (1 of 3)

Summary

The High Minus Low indicator is used to compute the range of daily bars

Signature

1
public abstract HighMinusLow HighMinusLow()

Return Value

HighMinusLow

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 [Output("Main")]
 public IndicatorDataSeries Result {get; set;}
 private HighMinusLow highMinusLow;
 protected override void Initialize()
 {
     highMinusLow = Indicators.HighMinusLow();
 }
 public override void Calculate(int index)
 {
     // Display the High Minus Low indicator on the chart
     Result[index] = highMinusLow.Result[index];
     Print("Previous HighMinusLow is: {0}", highMinusLow.Result[index-1]);
 }
 //...

HighMinusLow (2 of 3)

Summary

The High Minus Low indicator is used to compute the range of daily bars

Signature

1
public abstract HighMinusLow HighMinusLow(Bars bars)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars

Return Value

HighMinusLow

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 [Output("Main")]
 public IndicatorDataSeries Result {get; set;}
 private HighMinusLow highMinusLow;
 protected override void Initialize()
 {
     highMinusLow = Indicators.HighMinusLow(Bars);
 }
 public override void Calculate(int index)
 {
     // Display the High Minus Low indicator on the chart
     Result[index] = highMinusLow.Result[index];
     Print("Previous HighMinusLow is: {0}", highMinusLow.Result[index-1]);
 }
 //...

HighMinusLow (3 of 3)

Signature

1
public abstract HighMinusLow HighMinusLow(MarketSeries marketSeries)

Parameters

Name Type Description
marketSeries MarketSeries

Return Value

HighMinusLow

TrueRange (3)

TrueRange (1 of 3)

Summary

Initializes the True Range indicator.

Remarks

The True Range indicator is the daily range plus any gap from the closing price of the previous day

Signature

1
public abstract TrueRange TrueRange()

Return Value

TrueRange

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 [Output("Main")]
 public IndicatorDataSeries Result {get; set;}
 private TrueRange trueRange;
 protected override void Initialize()
 {
     trueRange = Indicators.TrueRange();
 }
 public override void Calculate(int index)
 {
     Result[index] = trueRange.Result[index];
 }

TrueRange (2 of 3)

Summary

Initializes the True Range indicator.

Remarks

The True Range indicator is the daily range plus any gap from the closing price of the previous day

Signature

1
public abstract TrueRange TrueRange(Bars bars)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars

Return Value

TrueRange

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 [Output("Main")]
 public IndicatorDataSeries Result {get; set;}
 private TrueRange trueRange;
 protected override void Initialize()
 {
     trueRange = Indicators.TrueRange(Bars);
 }
 public override void Calculate(int index)
 {
     Result[index] = trueRange.Result[index];
 }

TrueRange (3 of 3)

Signature

1
public abstract TrueRange TrueRange(MarketSeries marketSeries)

Parameters

Name Type Description
marketSeries MarketSeries

Return Value

TrueRange

WellesWilderSmoothing

Summary

Welles Wilder Smoothing eliminates noise to identify the trend.

Signature

1
public abstract WellesWilderSmoothing WellesWilderSmoothing(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The value of the periods used for calculation.

Return Value

WellesWilderSmoothing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 [Output("Main")]
 public IndicatorDataSeries Result {get; set;}
 private WellesWilderSmoothing wws;
 protected override void Initialize()
 {
     wws = Indicators.WellesWilderSmoothing(MarketSeries.Close, 14);
 }
 public override void Calculate(int index)
 {
     Result[index] = wws.Result[index];
 }

HullMovingAverage

Summary

The Hull Moving Average is a more responsive moving average that nearly removes lag and improves smoothing at the same time.

Signature

1
public abstract HullMovingAverage HullMovingAverage(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The value of the periods used for calculation.

Return Value

HullMovingAverage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 [Output("Main")]
 public IndicatorDataSeries Result {get; set;}
 private HullMovingAverage hma;
 protected override void Initialize()
 {
     hma = Indicators.HullMovingAverage(MarketSeries.Close, 14);
 }
 public override void Calculate(int index)
 {
     Result[index] = hma.Result[index];
 }

SwingIndex (3)

SwingIndex (1 of 3)

Summary

Returns the Swing Index indicator instance.

Signature

1
public abstract SwingIndex SwingIndex(int limitMoveValue)

Parameters

Name Type Description
limitMoveValue int The value of the limit move used for calculation.

Return Value

SwingIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 [Parameter(DefaultValue = 20)]
 public int limitMove { get; set; }
 [Output("Main")]
 public IndicatorDataSeries Result { get; set; }
 private SwingIndex si;
 protected override void Initialize()
 {
    si = Indicators.SwingIndex(limitMove);
 }
 public override void Calculate(int index)
 {
     //This stores current SwingIndex to Result Output
     Result[index] = si.Result[index];
     // This prints previous SwingIndex to log
     Print("Previous SwingIndex is: {0}", si.Result[index-1]);
 }

SwingIndex (2 of 3)

Summary

Returns the Swing Index indicator instance.

Signature

1
public abstract SwingIndex SwingIndex(Bars bars, int limitMoveValue)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
limitMoveValue int The value of the limit move used for calculation.

Return Value

SwingIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 [Parameter(DefaultValue = 20)]
 public int limitMove { get; set; }
 [Output("Main")]
 public IndicatorDataSeries Result { get; set; }
 private SwingIndex si;
 protected override void Initialize()
 {
    si = Indicators.SwingIndex(Bars, limitMove);
 }
 public override void Calculate(int index)
 {
     //This stores current SwingIndex to Result Output
     Result[index] = si.Result[index];
     // This prints previous SwingIndex to log
     Print("Previous SwingIndex is: {0}", si.Result[index-1]);
 }

SwingIndex (3 of 3)

Signature

1
public abstract SwingIndex SwingIndex(MarketSeries marketSeries, int limitMoveValue)

Parameters

Name Type Description
marketSeries MarketSeries
limitMoveValue int

Return Value

SwingIndex

AccumulativeSwingIndex (3)

AccumulativeSwingIndex (1 of 3)

Summary

Initializes the Accumulative Swing Index indicator

Remarks

The Accumulative Swing Index indicator is used as a divergence and confirmation tool.

Signature

1
public abstract AccumulativeSwingIndex AccumulativeSwingIndex(int limitMoveValue)

Parameters

Name Type Description
limitMoveValue int The value of the Limit Move used for calculation.

Return Value

AccumulativeSwingIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 [Parameter(DefaultValue = 20)]
 public int limitMove { get; set; }
 [Output("Main")]
 public IndicatorDataSeries Result { get; set; }
 private AccumulativeSwingIndex asi;
 protected override void Initialize()
 {
    asi = Indicators.AccumulativeSwingIndex(limitMove);
 }
 public override void Calculate(int index)
 {
     //This stores current AccumulativeSwingIndex to Result Output
     Result[index] = asi.Result[index];
     // This prints previous AccumulativeSwingIndex to log
     Print("Previous AccumulativeSwingIndex is: {0}", asi.Result[index-1]);
 }

AccumulativeSwingIndex (2 of 3)

Summary

Initializes the Accumulative Swing Index indicator

Remarks

The Accumulative Swing Index indicator is used as a divergence and confirmation tool.

Signature

1
public abstract AccumulativeSwingIndex AccumulativeSwingIndex(Bars bars, int limitMoveValue)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
limitMoveValue int The value of the Limit Move used for calculation.

Return Value

AccumulativeSwingIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 [Parameter(DefaultValue = 20)]
 public int limitMove { get; set; }
 [Output("Main")]
 public IndicatorDataSeries Result { get; set; }
 private AccumulativeSwingIndex asi;
 protected override void Initialize()
 {
    asi = Indicators.AccumulativeSwingIndex(Bars, limitMove);
 }
 public override void Calculate(int index)
 {
     //This stores current AccumulativeSwingIndex to Result Output
     Result[index] = asi.Result[index];
     // This prints previous AccumulativeSwingIndex to log
     Print("Previous AccumulativeSwingIndex is: {0}", asi.Result[index-1]);
 }

AccumulativeSwingIndex (3 of 3)

Signature

1
public abstract AccumulativeSwingIndex AccumulativeSwingIndex(MarketSeries marketSeries, int limitMoveValue)

Parameters

Name Type Description
marketSeries MarketSeries
limitMoveValue int

Return Value

AccumulativeSwingIndex

Aroon (3)

Aroon (1 of 3)

Summary

The Aroon indicator is used to identify trends and their reversals.

Signature

1
public abstract Aroon Aroon(int periods)

Parameters

Name Type Description
periods int The value of the periods used for calculation.

Return Value

Aroon

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 [Parameter("Period")]
 public int Period { get; set; }
 private Aroon aroon;
 protected override void OnStart()
 {
     aroon = Indicators.Aroon(Period);
 }
 protected override void OnTick()
 {
     if (aroon.Up.LastValue < aroon.Down.LastValue)
     {
         //Do something
     }
 }

Aroon (2 of 3)

Summary

The Aroon indicator is used to identify trends and their reversals.

Signature

1
public abstract Aroon Aroon(Bars bars, int periods)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int The value of the periods used for calculation.

Return Value

Aroon

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 [Parameter("Period")]
 public int Period { get; set; }
 private Aroon aroon;
 protected override void OnStart()
 {
     aroon = Indicators.Aroon(Bars, Period);
 }
 protected override void OnTick()
 {
     if (aroon.Up.LastValue < aroon.Down.LastValue)
     {
         //Do something
     }
 }

Aroon (3 of 3)

Signature

1
public abstract Aroon Aroon(MarketSeries marketSeries, int periods)

Parameters

Name Type Description
marketSeries MarketSeries
periods int

Return Value

Aroon

StandardDeviation

Summary

The Standard Deviation indicator shows volatility.

Signature

1
public abstract StandardDeviation StandardDeviation(DataSeries source, int periods, MovingAverageType maType)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The value of the periods used for calculation.
maType MovingAverageType Type of the Moving Average.

Return Value

StandardDeviation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 [Parameter]
 public DataSeries Source { get; set; }
 [Parameter(DefaultValue = 20)]
 public int Period { get; set; }
 [Parameter("MA Type", DefaultValue = MovingAverageType.Simple)]
 public MovingAverageType MAType { get; set; }
 private StandardDeviation sd;
 private double previousValue;
 protected override void OnStart()
 {
     sd = Indicators.StandardDeviation(Source, Period, MAType);
     previousValue = sd.Result.LastValue;
 }
 protected override void OnBar()
 {
     //If StandardDeviation has increased
     if (sd.Result.LastValue > previousValue)
     {
         //Do something
     }
     //...
     previousValue = sd.Result.LastValue;
 }

BollingerBands

Summary

The Bollinger Bands indicator shows volatility.

Signature

1
public abstract BollingerBands BollingerBands(DataSeries source, int periods, double standardDeviations, MovingAverageType maType)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The value of the periods used for calculation.
standardDeviations double The value of the standard deviations used for calculation.
maType MovingAverageType Type of the Moving Average.

Return Value

BollingerBands

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 [Parameter]
 public DataSeries Source { get; set; }
 [Parameter(DefaultValue = 20)]
 public int period { get; set; }
 [Parameter("MA Type", DefaultValue = MovingAverageType.Simple)]
 public MovingAverageType MAType { get; set; }
 [Parameter(DefaultValue = 1.5)]
 public double std { get; set; }
 private BollingerBands bb;
 protected override void OnStart()
 {
     bb = Indicators.BollingerBands(Source, period, std, MAType);
 }
 protected override void OnTick()
 {
     if (bb.Top.LastValue > Symbol.Bid)
     {
         Print("Bid price is higher than the Top Bollinger Band");
     }
 }

RelativeStrengthIndex

Summary

The Relative Strength Index indicator measures turns in price by measuring turns in momentum.

Signature

1
public abstract RelativeStrengthIndex RelativeStrengthIndex(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The value of the periods used for calculation.

Return Value

RelativeStrengthIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 [Parameter]
 public DataSeries Source { get; set; }
 [Parameter(DefaultValue = 20)]
 public int Period { get; set; }
 private RelativeStrengthIndex rsi;
 protected override void OnStart()
 {
     rsi = Indicators.RelativeStrengthIndex(Source, Period);
 }
 protected override void OnBar()
 {
     if (rsi.Result.LastValue > 70)
     {
         Print("RSI is higher than 70");
     }
 }

TimeSeriesMovingAverage

Summary

The Time Series Moving Average is a moving average based on linear regression

Signature

1
public abstract TimeSeriesMovingAverage TimeSeriesMovingAverage(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int Number of periods used for calculation.

Return Value

TimeSeriesMovingAverage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 [Parameter]
 public DataSeries Source { get; set; }
 [Parameter(DefaultValue = 14)]
 public int periodfast { get; set; }
 [Parameter(DefaultValue = 24)]
 public int periodslow { get; set; }
 private TimeSeriesMovingAverage tsmfast;
 private TimeSeriesMovingAverage tsmslow;
 protected override void OnStart()
 {
     tsmfast = Indicators.TimeSeriesMovingAverage(Source, periodfast);
     tsmslow = Indicators.TimeSeriesMovingAverage(Source, periodslow);
 }
 protected override void OnTick()
 {
     //If TSMA with period 14 moves above TSMA with period 24
     if (tsmfast.Result.LastValue > tsmslow.Result.LastValue)
     {
         //Do something
     }
 }

LinearRegressionForecast

Summary

Linear Regression Forecast is a trend indicator used to forecast values using the Least Squares Fit method.

Signature

1
public abstract LinearRegressionForecast LinearRegressionForecast(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The value of the periods used for calculation.

Return Value

LinearRegressionForecast

Examples

1
2
3
4
5
6
7
8
9
 private LinearRegressionForecast lrForecast;
 protected override void OnStart()
 {
     lrForecast = Indicators.LinearRegressionForecast(Source, Period);
 }
 protected override void OnTick()
 {
     Print("LRF Last Value = {0}", lrForecast.Result.LastValue);
 }

LinearRegressionRSquared

Summary

The R Squared or coefficient of determination indicator's main purpose is the confirm the strength of the market.

Signature

1
public abstract LinearRegressionRSquared LinearRegressionRSquared(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The value of the periods used for calculation.

Return Value

LinearRegressionRSquared

Examples

1
2
3
4
5
6
7
8
9
 private LinearRegressionRSquared rSquared;
 protected override void OnStart()
 {
     rSquared = Indicators.LinearRegressionRSquared(Source, Period);
 }
 protected override void OnTick()
 {
     Print("R squared is {0}", rSquared.Result.LastValue)
 }

PriceROC

Summary

The Price Rate of Change indicator is the percentage change of the current price and the price N periods ago.

Signature

1
public abstract PriceROC PriceROC(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The value of the periods used for calculation.

Return Value

PriceROC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 [Parameter("Source")]
 public DataSeries Source { get; set; }
 [Parameter(DefaultValue = 14)]
 public int Period { get; set; }
 private PriceROC priceROC;
 protected override void OnStart()
 {
     priceROC = Indicators.PriceROC(Source, Period);
 }
 protected override void OnTick()
 {
    Print("{0}", priceROC.Result.LastValue);
 }

Vidya

Summary

Volatility Index Dynamic Average (VIDYA) is a smoothing (moving average) based on dynamically changing periods.

Signature

1
public abstract Vidya Vidya(DataSeries source, int periods, double r2Scale)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The value of the periods used for calculation.
r2Scale double The value of the r-squared scale used for calculation.

Return Value

Vidya

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 [Parameter]
 public DataSeries Price { get; set; }
 [Parameter("Period", DefaultValue = 14)]
 public int Period { get; set; }
 [Parameter("Sigma", DefaultValue = 0.65, MinValue = 0.1, MaxValue = 0.95)]
 public double Sigma { get; set; }
 private Vidya vidya;
 protected override void OnStart()
 {
     vidya = Indicators.Vidya(Price, Period, Sigma);
 }
 protected override void OnTick()
 {
     //If vidya is greater than a specific value
     if (vidya.Result.LastValue > Value)
     {
         //Do something
         Print("LastValue {0}", vidya.Result.LastValue);
     }
     //...
 }

UltimateOscillator (3)

UltimateOscillator (1 of 3)

Summary

Returns the Ultimate Oscillator indicator instance.

Signature

1
public abstract UltimateOscillator UltimateOscillator(int cycle1, int cycle2, int cycle3)

Parameters

Name Type Description
cycle1 int The value of the short periods used for calculation.
cycle2 int The value of the medium periods used for calculation.
cycle3 int The value of the long periods used for calculation.

Return Value

UltimateOscillator

Examples

1
2
3
4
5
6
7
8
9
 protected override void OnStart()
 {
    ultimateOscillator = Indicators.UltimateOscillator(Cycle1,Cycle2,Cycle3);
 }
 protected override void OnTick()
 {
    double currentValue = ultimateOscillator.Result.LastValue;
     //...
 }

UltimateOscillator (2 of 3)

Summary

Returns the Ultimate Oscillator indicator instance.

Signature

1
public abstract UltimateOscillator UltimateOscillator(Bars bars, int cycle1, int cycle2, int cycle3)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
cycle1 int The value of the short periods used for calculation.
cycle2 int The value of the medium periods used for calculation.
cycle3 int The value of the long periods used for calculation.

Return Value

UltimateOscillator

Examples

1
2
3
4
5
6
7
8
9
 protected override void OnStart()
 {
    ultimateOscillator = Indicators.UltimateOscillator(Bars, Cycle1,Cycle2,Cycle3);
 }
 protected override void OnTick()
 {
    double currentValue = ultimateOscillator.Result.LastValue;
     //...
 }

UltimateOscillator (3 of 3)

Signature

1
public abstract UltimateOscillator UltimateOscillator(MarketSeries marketSeries, int cycle1, int cycle2, int cycle3)

Parameters

Name Type Description
marketSeries MarketSeries
cycle1 int
cycle2 int
cycle3 int

Return Value

UltimateOscillator

DirectionalMovementSystem (3)

DirectionalMovementSystem (1 of 3)

Summary

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

Signature

1
public abstract DirectionalMovementSystem DirectionalMovementSystem(int periods)

Parameters

Name Type Description
periods int The value of the periods used for calculation.

Return Value

DirectionalMovementSystem

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 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
     }
     //...
 }

DirectionalMovementSystem (2 of 3)

Summary

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

Signature

1
public abstract DirectionalMovementSystem DirectionalMovementSystem(Bars bars, int periods)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int The value of the periods used for calculation.

Return Value

DirectionalMovementSystem

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 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(Bars, Period);
 }
 protected override void OnTick()
 {
     _dIplus = _dms.DIPlus.LastValue;
     _dIminus = _dms.DIMinus.LastValue;
     if (_dIminus > _dIplus)
     {
         // Do something
     }
     //...
 }

DirectionalMovementSystem (3 of 3)

Signature

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

Parameters

Name Type Description
marketSeries MarketSeries
periods int

Return Value

DirectionalMovementSystem

ParabolicSAR (3)

ParabolicSAR (1 of 3)

Summary

The Parabolic SAR indicator identifies potential reversals in the market direction

Signature

1
public abstract ParabolicSAR ParabolicSAR(double minAf, double maxAf)

Parameters

Name Type Description
minAf double The minimum accumulation factor
maxAf double The maximum accumulation factor

Return Value

ParabolicSAR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 private ParabolicSAR parabolicSar;
 //...
 protected override void OnStart()
 {
    parabolicSar = Indicators.ParabolicSAR(minaf, maxaf);
 }
 protected override void OnTick()
 {
    double currentValue = parabolicSar.Result.LastValue;
     //...
 }

ParabolicSAR (2 of 3)

Summary

The Parabolic SAR indicator identifies potential reversals in the market direction

Signature

1
public abstract ParabolicSAR ParabolicSAR(Bars bars, double minAf, double maxAf)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
minAf double The minimum accumulation factor
maxAf double The maximum accumulation factor

Return Value

ParabolicSAR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 private ParabolicSAR parabolicSar;
 //...
 protected override void OnStart()
 {
    parabolicSar = Indicators.ParabolicSAR(Bars, minaf, maxaf);
 }
 protected override void OnTick()
 {
    double currentValue = parabolicSar.Result.LastValue;
     //...
 }

ParabolicSAR (3 of 3)

Signature

1
public abstract ParabolicSAR ParabolicSAR(MarketSeries marketSeries, double minAf, double maxAf)

Parameters

Name Type Description
marketSeries MarketSeries
minAf double
maxAf double

Return Value

ParabolicSAR

StochasticOscillator (3)

StochasticOscillator (1 of 3)

Summary

The Stochastic Oscillator is a momentum indicator that aims to show price reversals by comparing the closing price to the price range.

Signature

1
public abstract StochasticOscillator StochasticOscillator(int kPeriods, int kSlowing, int dPeriods, MovingAverageType maType)

Parameters

Name Type Description
kPeriods int The value of the k periods used for calculation.
kSlowing int The value of the k slowing used for calculation.
dPeriods int The value of the d periods used for calculation.
maType MovingAverageType Type of the Moving Average.

Return Value

StochasticOscillator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 private StochasticOscillator stochastic;
 //...
 protected override void OnStart()
 {
    stochastic = Indicators.StochasticOscillator(kPeriods, kSlowing, dPeriods, maType);
 }
 protected override void OnTick()
 {
    double percentD = stochastic.PercentD.LastValue;
    double percentK = stochastic.PercentK.LastValue;
     //...
 }

StochasticOscillator (2 of 3)

Summary

The Stochastic Oscillator is a momentum indicator that aims to show price reversals by comparing the closing price to the price range.

Signature

1
public abstract StochasticOscillator StochasticOscillator(Bars bars, int kPeriods, int kSlowing, int dPeriods, MovingAverageType maType)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
kPeriods int The value of the k periods used for calculation.
kSlowing int The value of the k slowing used for calculation.
dPeriods int The value of the d periods used for calculation.
maType MovingAverageType Type of the Moving Average.

Return Value

StochasticOscillator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 private StochasticOscillator stochastic;
 //...
 protected override void OnStart()
 {
    stochastic = Indicators.StochasticOscillator(Bars, kPeriods, kSlowing, dPeriods, maType);
 }
 protected override void OnTick()
 {
    double percentD = stochastic.PercentD.LastValue;
    double percentK = stochastic.PercentK.LastValue;
     //...
 }

StochasticOscillator (3 of 3)

Signature

1
public abstract StochasticOscillator StochasticOscillator(MarketSeries marketSeries, int kPeriods, int kSlowing, int dPeriods, MovingAverageType maType)

Parameters

Name Type Description
marketSeries MarketSeries
kPeriods int
kSlowing int
dPeriods int
maType MovingAverageType

Return Value

StochasticOscillator

MomentumOscillator

Summary

The Momentum Oscillator measures the momentum of the price.

Signature

1
public abstract MomentumOscillator MomentumOscillator(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The value of the periods used for calculation.

Return Value

MomentumOscillator

Examples

1
2
3
4
5
6
7
8
9
 private MomentumOscillator _momentum;
 protected override void OnStart()
 {
     _momentum = Indicators.MomentumOscillator(MarketSeries.Close, 14);
 }
 protected override void OnTick()
 {
     double momentum = _momentum.Result[index];
 }

MedianPrice (3)

MedianPrice (1 of 3)

Summary

The Median indicator is the average of the high and the low.

Signature

1
public abstract MedianPrice MedianPrice()

Return Value

MedianPrice

Examples

1
2
3
4
5
6
7
8
9
 private MedianPrice medianPrice;
 protected override void OnStart()
 {
     medianPrice = Indicators.MedianPrice();
 }
 protected override void OnTick()
 {
     double price = medianPrice.Result[index];
 }

MedianPrice (2 of 3)

Summary

The Median indicator is the average of the high and the low.

Signature

1
public abstract MedianPrice MedianPrice(Bars bars)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars

Return Value

MedianPrice

Examples

1
2
3
4
5
6
7
8
9
 private MedianPrice medianPrice;
 protected override void OnStart()
 {
     medianPrice = Indicators.MedianPrice(Bars);
 }
 protected override void OnTick()
 {
     double price = medianPrice.Result[index];
 }

MedianPrice (3 of 3)

Signature

1
public abstract MedianPrice MedianPrice(MarketSeries marketSeries)

Parameters

Name Type Description
marketSeries MarketSeries

Return Value

MedianPrice

WilliamsAccumulationDistribution (3)

WilliamsAccumulationDistribution (1 of 3)

Summary

The Williams Accumulation Distribution indicator shows bullish or bearish trends.

Signature

1
public abstract WilliamsAccumulationDistribution WilliamsAccumulationDistribution()

Return Value

WilliamsAccumulationDistribution

Examples

1
2
3
4
5
6
7
8
9
 private WilliamsAccumulationDistribution williamsAD;
 protected override void OnStart()
 {
     williamsAD = Indicators.WilliamsAccumulationDistribution();
 }
 protected override void OnTick()
 {
     double result = williamsAD.Result[index];
 }

WilliamsAccumulationDistribution (2 of 3)

Summary

The Williams Accumulation Distribution indicator shows bullish or bearish trends.

Signature

1
public abstract WilliamsAccumulationDistribution WilliamsAccumulationDistribution(Bars bars)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars

Return Value

WilliamsAccumulationDistribution

Examples

1
2
3
4
5
6
7
8
9
 private WilliamsAccumulationDistribution williamsAD;
 protected override void OnStart()
 {
     williamsAD = Indicators.WilliamsAccumulationDistribution(Bars);
 }
 protected override void OnTick()
 {
     double result = williamsAD.Result[index];
 }

WilliamsAccumulationDistribution (3 of 3)

Signature

1
public abstract WilliamsAccumulationDistribution WilliamsAccumulationDistribution(MarketSeries marketSeries)

Parameters

Name Type Description
marketSeries MarketSeries

Return Value

WilliamsAccumulationDistribution

FractalChaosBands (5)

FractalChaosBands (1 of 5)

Summary

The Fractal Chaos Bands indicator breaks down large trends into predictable patterns.

Signature

1
public abstract FractalChaosBands FractalChaosBands()

Return Value

FractalChaosBands

Examples

1
2
3
4
5
6
7
8
9
 private FractalChaosBands fractalChaosBands;
    protected override void Initialize()
    {
        fractalChaosBands = Indicators.FractalChaosBands();
    }
 public override void Calculate(int index)
    {
        Print("Fractal Chaos Bands High = {0}", fractalChaosBands.High[index]);
    }

FractalChaosBands (2 of 5)

Summary

The Fractal Chaos Bands indicator breaks down large trends into predictable patterns.

Signature

1
public abstract FractalChaosBands FractalChaosBands(Bars bars)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars

Return Value

FractalChaosBands

Examples

1
2
3
4
5
6
7
8
9
 private FractalChaosBands fractalChaosBands;
    protected override void Initialize()
    {
        fractalChaosBands = Indicators.FractalChaosBands(Bars);
    }
 public override void Calculate(int index)
    {
        Print("Fractal Chaos Bands High = {0}", fractalChaosBands.High[index]);
    }

FractalChaosBands (3 of 5)

Signature

1
public abstract FractalChaosBands FractalChaosBands(int periods)

Parameters

Name Type Description
periods int

Return Value

FractalChaosBands

FractalChaosBands (4 of 5)

Signature

1
public abstract FractalChaosBands FractalChaosBands(MarketSeries marketSeries, int periods)

Parameters

Name Type Description
marketSeries MarketSeries
periods int

Return Value

FractalChaosBands

FractalChaosBands (5 of 5)

Signature

1
public abstract FractalChaosBands FractalChaosBands(MarketSeries marketSeries)

Parameters

Name Type Description
marketSeries MarketSeries

Return Value

FractalChaosBands

TypicalPrice (3)

TypicalPrice (1 of 3)

Summary

The Typical Price indicator is the average of the high, low, and closing prices.

Signature

1
public abstract TypicalPrice TypicalPrice()

Return Value

TypicalPrice

Examples

1
2
3
4
5
6
7
8
9
 private TypicalPrice typicalPriceIndicator;
 protected override void Initialize()
 {
     typicalPriceIndicator = Indicators.TypicalPrice();
 }
 public override void Calculate(int index)
 {
     double typicalPriceValue = typicalPriceIndicator.Result[index];
 }

TypicalPrice (2 of 3)

Summary

The Typical Price indicator is the average of the high, low, and closing prices.

Signature

1
public abstract TypicalPrice TypicalPrice(Bars bars)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars

Return Value

TypicalPrice

Examples

1
2
3
4
5
6
7
8
9
 private TypicalPrice typicalPriceIndicator;
 protected override void Initialize()
 {
     typicalPriceIndicator = Indicators.TypicalPrice(Bars);
 }
 public override void Calculate(int index)
 {
     double typicalPriceValue = typicalPriceIndicator.Result[index];
 }

TypicalPrice (3 of 3)

Signature

1
public abstract TypicalPrice TypicalPrice(MarketSeries marketSeries)

Parameters

Name Type Description
marketSeries MarketSeries

Return Value

TypicalPrice

CommodityChannelIndex (3)

CommodityChannelIndex (1 of 3)

Summary

The Commodity Channel Index identifies overbough and oversold conditions, price reversals and trend strength.

Signature

1
public abstract CommodityChannelIndex CommodityChannelIndex(int periods)

Parameters

Name Type Description
periods int The value of the periods used for calculation.

Return Value

CommodityChannelIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 private CommodityChannelIndex commodityChannelIndex;
 //...
 protected override void OnStart()
 {
     commodityChannelIndex = Indicators.CommodityChannelIndex(Periods);
 }
 protected override void OnBar()
 {
     // Print the current value to the log
     Print("The current CCI value = {0}",
             commodityChannelIndex.Result.LastValue);
 }

CommodityChannelIndex (2 of 3)

Summary

The Commodity Channel Index identifies overbough and oversold conditions, price reversals and trend strength.

Signature

1
public abstract CommodityChannelIndex CommodityChannelIndex(Bars bars, int periods)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int The value of the periods used for calculation.

Return Value

CommodityChannelIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 private CommodityChannelIndex commodityChannelIndex;
 //...
 protected override void OnStart()
 {
     commodityChannelIndex = Indicators.CommodityChannelIndex(Bars, Periods);
 }
 protected override void OnBar()
 {
     // Print the current value to the log
     Print("The current CCI value = {0}",
             commodityChannelIndex.Result.LastValue);
 }

CommodityChannelIndex (3 of 3)

Signature

1
public abstract CommodityChannelIndex CommodityChannelIndex(MarketSeries marketSeries, int periods)

Parameters

Name Type Description
marketSeries MarketSeries
periods int

Return Value

CommodityChannelIndex

HistoricalVolatility

Summary

The Historical Volatility indicator is derived from time series of past market prices.

Signature

1
public abstract HistoricalVolatility HistoricalVolatility(DataSeries source, int periods, int barHistory)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The value of the periods used for calculation.
barHistory int The value of the bar history used for calculation.

Return Value

HistoricalVolatility

Examples

1
2
3
4
5
6
7
8
9
 protected override void OnStart()
 {
     historicalVolatility = Indicators.HistoricalVolatility
         (MarketSeries.Close, Period, BarHistory);
 }
 protected override void OnBar()
 {
     double hv = historicalVolatility.Result.LastValue;
 }

MassIndex (3)

MassIndex (1 of 3)

Summary

The Mass Index indicator is used to predict trend reversals.

Signature

1
public abstract MassIndex MassIndex(int periods)

Parameters

Name Type Description
periods int The value of the periods used for calculation.

Return Value

MassIndex

Examples

1
2
3
4
5
6
7
8
9
 private MassIndex massIndex;
 protected override void Initialize()
 {
     massIndex = Indicators.MassIndex(14);
 }
 public override void Calculate(int index)
 {
     double currentMassIndex = massIndex.Result[index];
 }

MassIndex (2 of 3)

Summary

The Mass Index indicator is used to predict trend reversals.

Signature

1
public abstract MassIndex MassIndex(Bars bars, int periods)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int The value of the periods used for calculation.

Return Value

MassIndex

Examples

1
2
3
4
5
6
7
8
9
 private MassIndex massIndex;
 protected override void Initialize()
 {
     massIndex = Indicators.MassIndex(Bars, 14);
 }
 public override void Calculate(int index)
 {
     double currentMassIndex = massIndex.Result[index];
 }

MassIndex (3 of 3)

Signature

1
public abstract MassIndex MassIndex(MarketSeries marketSeries, int periods)

Parameters

Name Type Description
marketSeries MarketSeries
periods int

Return Value

MassIndex

ChaikinVolatility (3)

ChaikinVolatility (1 of 3)

Summary

The Chaikin Volatiliy indicator measures the trading range between the high and the low prices.

Signature

1
public abstract ChaikinVolatility ChaikinVolatility(int periods, int rateOfChange, MovingAverageType maType)

Parameters

Name Type Description
periods int The value of the periods used for calculation.
rateOfChange int The value of the rage of change used for calculation.
maType MovingAverageType Type of the Moving Average.

Return Value

ChaikinVolatility

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 private ChaikinVolatility chaikinVolatility;
 protected override void OnStart()
 {
     chaikinVolatility = Indicators.ChaikinVolatility(Periods, _roc, MaType);
 }
 protected override void OnBar()
 {
     // Print to log
     Print("The Current Chaikin Volatility Value is: {0}",
              chaikinVolatility.Result.LastValue);
 }

ChaikinVolatility (2 of 3)

Summary

The Chaikin Volatiliy indicator measures the trading range between the high and the low prices.

Signature

1
public abstract ChaikinVolatility ChaikinVolatility(Bars bars, int periods, int rateOfChange, MovingAverageType maType)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int The value of the periods used for calculation.
rateOfChange int The value of the rage of change used for calculation.
maType MovingAverageType Type of the Moving Average.

Return Value

ChaikinVolatility

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 private ChaikinVolatility chaikinVolatility;
 protected override void OnStart()
 {
     chaikinVolatility = Indicators.ChaikinVolatility(Bars, Periods, _roc, MaType);
 }
 protected override void OnBar()
 {
     // Print to log
     Print("The Current Chaikin Volatility Value is: {0}",
              chaikinVolatility.Result.LastValue);
 }

ChaikinVolatility (3 of 3)

Signature

1
public abstract ChaikinVolatility ChaikinVolatility(MarketSeries marketSeries, int periods, int rateOfChange, MovingAverageType maType)

Parameters

Name Type Description
marketSeries MarketSeries
periods int
rateOfChange int
maType MovingAverageType

Return Value

ChaikinVolatility

DetrendedPriceOscillator

Summary

The Detrended Price Oscillator shows intermediate overbought and oversold levels.

Signature

1
public abstract DetrendedPriceOscillator DetrendedPriceOscillator(DataSeries source, int periods, MovingAverageType maType)

Parameters

Name Type Description
source DataSeries The price source data used for calculation.
periods int The period used for calculation.
maType MovingAverageType Type of the Moving Average.

Return Value

DetrendedPriceOscillator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 private _detrendedPriceOscillator _dpoFast;
 private _detrendedPriceOscillator _dpoSlow;
 protected override void OnStart()
 {
     _dpoFast = Indicators.DetrendedPriceOscillator(Source, PeriodFast, MaType);
     _dpoSlow = Indicators.DetrendedPriceOscillator(Source, PeriodSlow, MaType);
 }
 protected override void OnBar()
 {
     if(_dpoFast.Result.Count < 1)
         return;
     int currentIndex = _dpoFast.Result.Count - 1;
     int prevIndex = currentIndex - 1;
     if (_dpoFast.Result[prevIndex] > _dpoSlow.Result[prevIndex])
     {
         //Do something
     }
 }

LinearRegressionIntercept

Summary

The Linear Regression Intercept can be used together with the Linear Regression Slope indicator to plot the Linear Regression Line.

Signature

1
public abstract LinearRegressionIntercept LinearRegressionIntercept(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The price source data used for calculation.
periods int The period used for calculation.

Return Value

LinearRegressionIntercept

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 [Parameter("Period", DefaultValue = 14)]
    public int Period { get; set; }
    protected override void OnStart()
 {
     // initialize a new instance of LinearRegressionIntercept indicator class
        _linearRegressionIntercept = Indicators.
         LinearRegressionIntercept(MarketSeries.Close, Period);
    }
    protected override void OnBar(int index)
    {
     // Result of _linearRegressionIntercept at the current index
     double result = _linearRegressionIntercept.Result[index];
     // Print the current result to the log
        Print("Linear Regression Intercept at the current index is = {0}", result);
    }

LinearRegressionSlope

Summary

The Linear Regression Slope indicator is intended to measure the direction and strength of a trend.

Signature

1
public abstract LinearRegressionSlope LinearRegressionSlope(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The price source data used for calculation.
periods int The period used for calculation.

Return Value

LinearRegressionSlope

Examples

1
2
3
4
5
6
7
8
9
 private LinearRegressionSlope slope;
 protected override void Initialize()
 {
     slope = Indicators.LinearRegressionSlope(MarketSeries.Close, 14);
 }
 public override void Calculate(int index)
 {
     double currentSlope = slope.Result[index];
 }

MacdHistogram (2)

MacdHistogram (1 of 2)

Summary

The MACD Histogram is a momentum indicator measured by typically subtracting a 26 period moving average from a 12 period moving average.

Signature

1
public abstract MacdHistogram MacdHistogram(int longCycle, int shortCycle, int signalPeriods)

Parameters

Name Type Description
longCycle int The long period used calculation.
shortCycle int The short period used calculation.
signalPeriods int The period used for the calculation of the signal.

Return Value

MacdHistogram

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 private MacdHistogram macd;
 //...
 protected override void Initialize()
 {
     macd = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
     //...
 }
 public override void Calculate(int index)
 {
     double macdHistogramResult = macd.Histogram[index];
     double macdSignalResult = macd.Signal[index];
     //...
 }

MacdHistogram (2 of 2)

Summary

Initializes the MacdHistogram indicator instance for a specific source series

Signature

1
public abstract MacdHistogram MacdHistogram(DataSeries source, int longCycle, int shortCycle, int signalPeriods)

Parameters

Name Type Description
source DataSeries The source series to be applied
longCycle int The long period used calculation.
shortCycle int The short period used calculation.
signalPeriods int The period used for the calculation of the signal.

Return Value

MacdHistogram

MacdCrossOver (2)

MacdCrossOver (1 of 2)

Summary

The MACD Line with the Signal line and their difference as a histogram.

Signature

1
public abstract MacdCrossOver MacdCrossOver(int longCycle, int shortCycle, int signalPeriods)

Parameters

Name Type Description
longCycle int The long period used calculation.
shortCycle int The short period used calculation.
signalPeriods int The period used for the calculation of the signal.

Return Value

MacdCrossOver

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 //...
 private MacdCrossOver _macdCrossOver;
 protected override void Initialize()
 {
     _macdCrossOver = Indicators.MacdCrossOver(LongCycle, ShortCycle, Period);
 }
 public override void Calculate(int index)
 {
     double macd = _macdCrossOver.MACD[index];
     double signal = _macdCrossOver.Signal[index];
     //...
 }

MacdCrossOver (2 of 2)

Summary

Initializes the MacdCrossOver indicator instance for a specific source series

Signature

1
public abstract MacdCrossOver MacdCrossOver(DataSeries source, int longCycle, int shortCycle, int signalPeriods)

Parameters

Name Type Description
source DataSeries The source series to be applied
longCycle int The long period used calculation.
shortCycle int The short period used calculation.
signalPeriods int The period used for the calculation of the signal.

Return Value

MacdCrossOver

PriceOscillator

Summary

The Price Oscillator calculates the difference between two moving averages.

Signature

1
public abstract PriceOscillator PriceOscillator(DataSeries source, int longCycle, int shortCycle, MovingAverageType maType)

Parameters

Name Type Description
source DataSeries The price source data used for calculation.
longCycle int The long period used for calculation.
shortCycle int The short period used for calculation.
maType MovingAverageType Type of the Moving Average.

Return Value

PriceOscillator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 //...
 private PriceOscillator priceOscillator;
 protected override void OnStart()
 {
     priceOscillator = Indicators.PriceOscillator
         (MarketSeries.Close, 14, 5, MovingAverageType.Simple);
     //...
 }
 protected override void OnTick()
 {
     double result = priceOscillator.Result[index];
     //...
 }

RainbowOscillator

Summary

The Rainbow Oscillator is a process of repetitive smoothing of simple moving averages resulting in a full spectrum of trends.

Signature

1
public abstract RainbowOscillator RainbowOscillator(DataSeries source, int levels, MovingAverageType maType)

Parameters

Name Type Description
source DataSeries The price source data used for calculation.
levels int The value of the levels used for calculation.
maType MovingAverageType The Moving Average type used for calculation.

Return Value

RainbowOscillator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 //...
 private RainbowOscillator rainbow;
 protected override void Initialize()
 {
     MovingAverageType simpleMa = MovingAverageType.Simple;
     DataSeries close = MarketSeries.Close;
     rainbow = Indicators.RainbowOscillator(close, 9, simpleMa);
     //...
 }
 public override void Calculate(int index)
 {
     double currentValue = rainbow.Result[index];
     //...
 }

VerticalHorizontalFilter

Summary

The Vertical Horizontal Filter indicator measures the level of trend activity.

Signature

1
public abstract VerticalHorizontalFilter VerticalHorizontalFilter(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The periods used for calculation.

Return Value

VerticalHorizontalFilter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 //...
 private VerticalHorizontalFilter VHFilter;
 //...
 protected override void Initialize()
 {
     VHFilter = Indicators.VerticalHorizontalFilter(Source, Periods);
     //...
 }
 public override void Calculate(int index)
 {
     double result = VHFilter.Result[index];
     //...
 }

WilliamsPctR (3)

WilliamsPctR (1 of 3)

Summary

The Williams Percent R indicator is a momentum indicator measuring overbought and oversold levels.

Signature

1
public abstract WilliamsPctR WilliamsPctR(int periods)

Parameters

Name Type Description
periods int The period used for calculation.

Return Value

WilliamsPctR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 //...
 private WilliamsPctR williamsPctRSeries;
 //...
 protected override void OnStart()
 {
     williamsPctRSeries = Indicators.WilliamsPctR(14);
     //...
 }
 protected override void OnTick()
 {
     double williamsPctRValue = williamsPctRSeries.Result[index];
     //...
 }

WilliamsPctR (2 of 3)

Summary

The Williams Percent R indicator is a momentum indicator measuring overbought and oversold levels.

Signature

1
public abstract WilliamsPctR WilliamsPctR(Bars bars, int periods)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int The period used for calculation.

Return Value

WilliamsPctR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 //...
 private WilliamsPctR williamsPctRSeries;
 //...
 protected override void OnStart()
 {
     williamsPctRSeries = Indicators.WilliamsPctR(Bars, 14);
     //...
 }
 protected override void OnTick()
 {
     double williamsPctRValue = williamsPctRSeries.Result[index];
     //...
 }

WilliamsPctR (3 of 3)

Signature

1
public abstract WilliamsPctR WilliamsPctR(MarketSeries marketSeries, int periods)

Parameters

Name Type Description
marketSeries MarketSeries
periods int

Return Value

WilliamsPctR

Trix

Summary

The Trix indicator shows the slope of a triple-smoothed exponential moving average.

Signature

1
public abstract Trix Trix(DataSeries source, int periods)

Parameters

Name Type Description
source DataSeries The source data used for calculation.
periods int The periods used for the calculation.

Return Value

Trix

Examples

1
2
3
4
5
6
7
8
9
 private Trix trixSeries;
 protected override void OnStart()
 {
     trixSeries = Indicators.Trix(MarketSeries.Close, 14);
 }
 protected override void OnTick()
 {
     double trixValue = trixSeries.Result[index];
 }

WeightedClose (3)

WeightedClose (1 of 3)

Summary

The WeightedClose indicator is an average of each day's price with extra weight given to the closing price.

Remarks

Similar to the Median Price and Typical Price Indicators

Signature

1
public abstract WeightedClose WeightedClose()

Return Value

WeightedClose

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 //...
 private WeightedClose weightedCloseSeries;
 //...
 protected override void OnStart()
 {
     weightedCloseSeries = Indicators.WeightedClose();
     //...
 }
 protected override void OnBar()
 {
     double weightedCloseValue = weightedCloseSeries.Result[index];
     //...
 }

WeightedClose (2 of 3)

Summary

The WeightedClose indicator is an average of each day's price with extra weight given to the closing price.

Remarks

Similar to the Median Price and Typical Price Indicators

Signature

1
public abstract WeightedClose WeightedClose(Bars bars)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars

Return Value

WeightedClose

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 //...
 private WeightedClose weightedCloseSeries;
 //...
 protected override void OnStart()
 {
     weightedCloseSeries = Indicators.WeightedClose(Bars);
     //...
 }
 protected override void OnBar()
 {
     double weightedCloseValue = weightedCloseSeries.Result[index];
     //...
 }

WeightedClose (3 of 3)

Signature

1
public abstract WeightedClose WeightedClose(MarketSeries marketSeries)

Parameters

Name Type Description
marketSeries MarketSeries

Return Value

WeightedClose

ChaikinMoneyFlow (3)

ChaikinMoneyFlow (1 of 3)

Summary

The Chaikin Money Flow indicator measures the money flow volume over a specific period.

Signature

1
public abstract ChaikinMoneyFlow ChaikinMoneyFlow(int periods)

Parameters

Name Type Description
periods int The period used for the calculation

Return Value

ChaikinMoneyFlow

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 private ChaikinMoneyFlow _chaikinMoneyFlow;
 [Parameter("Period", DefaultValue = 21)]
 public int Period { get; set; }
 protected override void OnStart()
 {
    _chaikinMoneyFlow = Indicators.ChaikinMoneyFlow(Period);
 }
 protected override void OnBar()
 {
    var index = MarketSeries.Open.Count - 1;
    double currentChaikinMF = _chaikinMoneyFlow.Result[index];
    double previousChaikinMF = _chaikinMoneyFlow.Result[index-1];
 }

ChaikinMoneyFlow (2 of 3)

Summary

The Chaikin Money Flow indicator measures the money flow volume over a specific period.

Signature

1
public abstract ChaikinMoneyFlow ChaikinMoneyFlow(Bars bars, int periods)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int The period used for the calculation

Return Value

ChaikinMoneyFlow

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 private ChaikinMoneyFlow _chaikinMoneyFlow;
 [Parameter("Period", DefaultValue = 21)]
 public int Period { get; set; }
 protected override void OnStart()
 {
    _chaikinMoneyFlow = Indicators.ChaikinMoneyFlow(Bars, Period);
 }
 protected override void OnBar()
 {
    var index = MarketSeries.Open.Count - 1;
    double currentChaikinMF = _chaikinMoneyFlow.Result[index];
    double previousChaikinMF = _chaikinMoneyFlow.Result[index-1];
 }

ChaikinMoneyFlow (3 of 3)

Signature

1
public abstract ChaikinMoneyFlow ChaikinMoneyFlow(MarketSeries marketSeries, int periods)

Parameters

Name Type Description
marketSeries MarketSeries
periods int

Return Value

ChaikinMoneyFlow

EaseOfMovement (3)

EaseOfMovement (1 of 3)

Summary

The Ease Of Movement indicator relates the price change to the volume.

Signature

1
public abstract EaseOfMovement EaseOfMovement(int periods, MovingAverageType maType)

Parameters

Name Type Description
periods int The period used for the calculation
maType MovingAverageType The moving average type used for the calculation

Return Value

EaseOfMovement

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 private EaseOfMovement _easeOfMovement;
 [Parameter("Period", DefaultValue = 14)]
 public int Period { get; set; }
 [Parameter("MA Type", DefaultValue = MovingAverageType.Simple)]
 public MovingAverageType MAType { get; set; }
 protected override void OnStart()
 {
    _easeOfMovement = Indicators.EaseOfMovement(Period, MAType);
 }
 protected override void OnBar()
 {
    // get EaseOfMovement value
    var index = MarketSeries.Open.Count - 1;
    double currentEaseOfMovement = _easeOfMovement.Result[index];
    double previousEaseOfMovement = _easeOfMovement.Result[index-1];
 }

EaseOfMovement (2 of 3)

Summary

The Ease Of Movement indicator relates the price change to the volume.

Signature

1
public abstract EaseOfMovement EaseOfMovement(Bars bars, int periods, MovingAverageType maType)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int The period used for the calculation
maType MovingAverageType The moving average type used for the calculation

Return Value

EaseOfMovement

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 private EaseOfMovement _easeOfMovement;
 [Parameter("Period", DefaultValue = 14)]
 public int Period { get; set; }
 [Parameter("MA Type", DefaultValue = MovingAverageType.Simple)]
 public MovingAverageType MAType { get; set; }
 protected override void OnStart()
 {
    _easeOfMovement = Indicators.EaseOfMovement(Bars, Period, MAType);
 }
 protected override void OnBar()
 {
    // get EaseOfMovement value
    var index = MarketSeries.Open.Count - 1;
    double currentEaseOfMovement = _easeOfMovement.Result[index];
    double previousEaseOfMovement = _easeOfMovement.Result[index-1];
 }

EaseOfMovement (3 of 3)

Signature

1
public abstract EaseOfMovement EaseOfMovement(MarketSeries marketSeries, int periods, MovingAverageType maType)

Parameters

Name Type Description
marketSeries MarketSeries
periods int
maType MovingAverageType

Return Value

EaseOfMovement

MoneyFlowIndex (3)

MoneyFlowIndex (1 of 3)

Summary

The Money Flow Index measures the strength of the money flow.

Signature

1
public abstract MoneyFlowIndex MoneyFlowIndex(int periods)

Parameters

Name Type Description
periods int The period used for the calculation

Return Value

MoneyFlowIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 private MoneyFlowIndex _moneyFlow;
 [Parameter("Period", DefaultValue = 21)]
 public int Period { get; set; }
 protected override void OnStart()
 {
     _moneyFlow = Indicators.MoneyFlowIndex(Period);
 }
 protected override void OnBar()
 {
     var currentValue = _moneyFlow.Result.LastValue;
     //...
 }

MoneyFlowIndex (2 of 3)

Summary

The Money Flow Index measures the strength of the money flow.

Signature

1
public abstract MoneyFlowIndex MoneyFlowIndex(Bars bars, int periods)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int The period used for the calculation

Return Value

MoneyFlowIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 private MoneyFlowIndex _moneyFlow;
 [Parameter("Period", DefaultValue = 21)]
 public int Period { get; set; }
 protected override void OnStart()
 {
     _moneyFlow = Indicators.MoneyFlowIndex(Bars, Period);
 }
 protected override void OnBar()
 {
     var currentValue = _moneyFlow.Result.LastValue;
     //...
 }

MoneyFlowIndex (3 of 3)

Signature

1
public abstract MoneyFlowIndex MoneyFlowIndex(MarketSeries marketSeries, int periods)

Parameters

Name Type Description
marketSeries MarketSeries
periods int

Return Value

MoneyFlowIndex

NegativeVolumeIndex

Summary

The Negative Volume Index is a calculation of the percentage change in price on days when trading volume declines.

Signature

1
public abstract NegativeVolumeIndex NegativeVolumeIndex(DataSeries source)

Parameters

Name Type Description
source DataSeries The price source data used for the calculation.

Return Value

NegativeVolumeIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 private NegativeVolumeIndex _negativeVolume;
 [Parameter]
 public DataSeries Source { get; set; }
 [Output("Main")]
 public IndicatorDataSeries Result { get; set; }
 protected override void Initialize()
 {
    _negativeVolume = Indicators.NegativeVolumeIndex(Source);
 }
 public override void Calculate(int index)
 {
    // Display Result of Indicator
    Result[index] = _negativeVolume.Result[index];
 }

OnBalanceVolume

Summary

The On Balance Volume indicator relates price and volume.

Signature

1
public abstract OnBalanceVolume OnBalanceVolume(DataSeries source)

Parameters

Name Type Description
source DataSeries The price source data used for the calculation.

Return Value

OnBalanceVolume

PositiveVolumeIndex

Summary

The Positive Volume Index is a calculation of the percentage change in price on days when trading volume increased.

Signature

1
public abstract PositiveVolumeIndex PositiveVolumeIndex(DataSeries source)

Parameters

Name Type Description
source DataSeries The price source data used for the calculation.

Return Value

PositiveVolumeIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 private PositiveVolumeIndex _positiveVolume;
 [Parameter]
 public DataSeries Source { get; set; }
 protected override void OnStart()
 {
     _positiveVolume = Indicators.PositiveVolumeIndex(Source);
 }
 protected override void OnBar()
 {
     var currentValue = _positiveVolume.Result.LastValue;
     //...
 }

PriceVolumeTrend

Summary

The Price Volume Trend indicator shows the relationship between price and volume.

Signature

1
public abstract PriceVolumeTrend PriceVolumeTrend(DataSeries source)

Parameters

Name Type Description
source DataSeries The price source data used for the calculation.

Return Value

PriceVolumeTrend

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 private PriceVolumeTrend _priceVolumeTrend;
 [Parameter]
 public DataSeries Source { get; set; }
 protected override void OnStart()
 {
     _priceVolumeTrend = Indicators.PriceVolumeTrend(Source);
 }
 protected override void OnBar()
 {
     var currentValue = _priceVolumeTrend.Result.LastValue;
     //...
 }

TradeVolumeIndex

Summary

Trade Volume Index indicator measures the amount of money flowing in and out of an asset.

Signature

1
public abstract TradeVolumeIndex TradeVolumeIndex(DataSeries source)

Parameters

Name Type Description
source DataSeries The price source data used for the calculation.

Return Value

TradeVolumeIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 private TradeVolumeIndex _tradeVolume;
 [Parameter]
 public DataSeries Source { get; set; }
 protected override void OnStart()
 {
     _tradeVolume = Indicators.TradeVolumeIndex(Source);
 }
 protected override void OnBar()
 {
     var currentValue = _tradeVolume.Result.LastValue;
     //...
 }

VolumeOscillator (3)

VolumeOscillator (1 of 3)

Summary

The Volume Oscillator indicator is the difference between two moving averages.

Signature

1
public abstract VolumeOscillator VolumeOscillator(int shortTerm, int longTerm)

Parameters

Name Type Description
shortTerm int The fast moving average period
longTerm int The slow moving average period

Return Value

VolumeOscillator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 private VolumeOscillator _volumeOscillator;
 [Parameter("Short Term", DefaultValue = 9)]
 public int ShortTerm { get; set; }
 [Parameter("Long Term", DefaultValue = 21)]
 public int LongTerm { get; set; }
 protected override void OnStart()
 {
     _volumeOscillator = Indicators.VolumeOscillator(ShortTerm, LongTerm);;
 }
 protected override void OnBar()
 {
     var currentValue = _volumeOscillator.Result.LastValue;
     //...
 }

VolumeOscillator (2 of 3)

Summary

The Volume Oscillator indicator is the difference between two moving averages.

Signature

1
public abstract VolumeOscillator VolumeOscillator(Bars bars, int shortTerm, int longTerm)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
shortTerm int The fast moving average period
longTerm int The slow moving average period

Return Value

VolumeOscillator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 private VolumeOscillator _volumeOscillator;
 [Parameter("Short Term", DefaultValue = 9)]
 public int ShortTerm { get; set; }
 [Parameter("Long Term", DefaultValue = 21)]
 public int LongTerm { get; set; }
 protected override void OnStart()
 {
     _volumeOscillator = Indicators.VolumeOscillator(Bars, ShortTerm, LongTerm);;
 }
 protected override void OnBar()
 {
     var currentValue = _volumeOscillator.Result.LastValue;
     //...
 }

VolumeOscillator (3 of 3)

Signature

1
public abstract VolumeOscillator VolumeOscillator(MarketSeries marketSeries, int shortTerm, int longTerm)

Parameters

Name Type Description
marketSeries MarketSeries
shortTerm int
longTerm int

Return Value

VolumeOscillator

VolumeROC (3)

VolumeROC (1 of 3)

Summary

Volume Rate of Change Indicator measures the rate of change of the tick volume.

Signature

1
public abstract VolumeROC VolumeROC(int periods)

Parameters

Name Type Description
periods int The period used for the calculation

Return Value

VolumeROC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 //...
 private VolumeROC _volumeROC;
 //...
 [Parameter("Period", DefaultValue = 21)]
 public int Period { get; set; }
 protected override void OnStart()
 {
     _volumeROC = Indicators.VolumeROC(Period);
 }
 protected override void OnBar()
 {
     var currentValue = _volumeROC.Result.LastValue;
     //...
 }

VolumeROC (2 of 3)

Summary

Volume Rate of Change Indicator measures the rate of change of the tick volume.

Signature

1
public abstract VolumeROC VolumeROC(Bars bars, int periods)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int The period used for the calculation

Return Value

VolumeROC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 //...
 private VolumeROC _volumeROC;
 //...
 [Parameter("Period", DefaultValue = 21)]
 public int Period { get; set; }
 protected override void OnStart()
 {
     _volumeROC = Indicators.VolumeROC(Bars, Period);
 }
 protected override void OnBar()
 {
     var currentValue = _volumeROC.Result.LastValue;
     //...
 }

VolumeROC (3 of 3)

Signature

1
public abstract VolumeROC VolumeROC(MarketSeries marketSeries, int periods)

Parameters

Name Type Description
marketSeries MarketSeries
periods int

Return Value

VolumeROC

AverageTrueRange (3)

AverageTrueRange (1 of 3)

Summary

Average true range. An indicator providing the degree of price volatility.

Remarks

Average true range (ATR) is a technical analysis volatility indicator originally developed by J. Welles Wilder. The indicator provides the degree of price volatility. The average true range is an N-day exponential moving average of the true range values. Wilder recommended a 14-period smoothing.

Signature

1
public abstract AverageTrueRange AverageTrueRange(int periods, MovingAverageType maType)

Parameters

Name Type Description
periods int Period of moving average to use for Average True Range caluclation.
maType MovingAverageType Type of moving average to use for Average True Range caluclation.

Return Value

AverageTrueRange

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 private AverageTrueRange atrIndicator;
 [Parameter(DefaultValue = 20)]
 public int Period { get; set; }
 [Parameter("MA Type", DefaultValue = MovingAverageType.Simple)]
 public MovingAverageType MAType { get; set; }
 [Parameter(DefaultValue = 0.002)]
 public double ATRValue { get; set; }
 protected override void OnStart()
 {
     atrIndicator = Indicators.AverageTrueRange(Period, MAType);
 }
 protected override void OnTick()
 {
     //If atrIndicator last value is greater than the ATRValue input
     if (atrIndicator.Result.LastValue > ATRValue)
     {
         // Do something
     }
     //...
 }

AverageTrueRange (2 of 3)

Summary

Average true range. An indicator providing the degree of price volatility.

Remarks

Average true range (ATR) is a technical analysis volatility indicator originally developed by J. Welles Wilder. The indicator provides the degree of price volatility. The average true range is an N-day exponential moving average of the true range values. Wilder recommended a 14-period smoothing.

Signature

1
public abstract AverageTrueRange AverageTrueRange(Bars bars, int periods, MovingAverageType maType)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int Period of moving average to use for Average True Range caluclation.
maType MovingAverageType Type of moving average to use for Average True Range caluclation.

Return Value

AverageTrueRange

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 private AverageTrueRange atrIndicator;
 [Parameter(DefaultValue = 20)]
 public int Period { get; set; }
 [Parameter("MA Type", DefaultValue = MovingAverageType.Simple)]
 public MovingAverageType MAType { get; set; }
 [Parameter(DefaultValue = 0.002)]
 public double ATRValue { get; set; }
 protected override void OnStart()
 {
     atrIndicator = Indicators.AverageTrueRange(Bars, Period, MAType);
 }
 protected override void OnTick()
 {
     //If atrIndicator last value is greater than the ATRValue input
     if (atrIndicator.Result.LastValue > ATRValue)
     {
         // Do something
     }
     //...
 }

AverageTrueRange (3 of 3)

Signature

1
public abstract AverageTrueRange AverageTrueRange(MarketSeries marketSeries, int periods, MovingAverageType maType)

Parameters

Name Type Description
marketSeries MarketSeries
periods int
maType MovingAverageType

Return Value

AverageTrueRange

DonchianChannel (3)

DonchianChannel (1 of 3)

Summary

The Donchian channel is a volatility indicator forming a channel between the highest high and the lowest low of the chosen period.

Remarks

The Donchian channel is mainly used for providing entry signals. A long is established when the price closes above the Donchian Channel. Conversely, if it closes below, then a short is established.

Signature

1
public abstract DonchianChannel DonchianChannel(int periods)

Parameters

Name Type Description
periods int Period of Calculation of the Dochian Channel

Return Value

DonchianChannel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 //...
 private DonchianChannel donchian;
 //...
 protected override void OnStart()
 {
     donchian = Indicators.DonchianChannel(Period);
 }
 protected override void OnBar()
 {
     Print("Top Value = {0}", donchian.Top.LastValue);
     Print("Middle Value = {0}", donchian.Middle.LastValue);
     Print("Bottom Value = {0}", donchian.Bottom.LastValue);
     //...
 }

DonchianChannel (2 of 3)

Summary

The Donchian channel is a volatility indicator forming a channel between the highest high and the lowest low of the chosen period.

Remarks

The Donchian channel is mainly used for providing entry signals. A long is established when the price closes above the Donchian Channel. Conversely, if it closes below, then a short is established.

Signature

1
public abstract DonchianChannel DonchianChannel(Bars bars, int periods)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int Period of Calculation of the Dochian Channel

Return Value

DonchianChannel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 //...
 private DonchianChannel donchian;
 //...
 protected override void OnStart()
 {
     donchian = Indicators.DonchianChannel(Bars, Period);
 }
 protected override void OnBar()
 {
     Print("Top Value = {0}", donchian.Top.LastValue);
     Print("Middle Value = {0}", donchian.Middle.LastValue);
     Print("Bottom Value = {0}", donchian.Bottom.LastValue);
     //...
 }

DonchianChannel (3 of 3)

Signature

1
public abstract DonchianChannel DonchianChannel(MarketSeries marketSeries, int periods)

Parameters

Name Type Description
marketSeries MarketSeries
periods int

Return Value

DonchianChannel

IchimokuKinkoHyo (3)

IchimokuKinkoHyo (1 of 3)

Summary

Ichimoku Kinko Hyo Indicator is a moving average based trend identification system.

Remarks

Ichimoku Kinko Hyo Indicator contains more data points than standard candlestick charts and thus provides a clearer picture of potential price action.

Signature

1
public abstract IchimokuKinkoHyo IchimokuKinkoHyo(int tenkanSenPeriods, int kijunSenPeriods, int senkouSpanBPeriods)

Parameters

Name Type Description
tenkanSenPeriods int The period used for the Tenkan Sen
kijunSenPeriods int The period used for the Kijun Sen
senkouSpanBPeriods int The period used for the Senkou Span B

Return Value

IchimokuKinkoHyo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
 //...
 private IchimokuKinkoHyo ichimokuKinkoHyo;
 //...
 protected override void OnStart()
 {
     ichimokuKinkoHyo = Indicators.IchimokuKinkoHyo
         (tenkanSenPeriods, kijunSenPeriods, senkouSpanBPeriods);
 }
 protected override void OnBar()
 {
     Print("ChikouSpan Value = {0}", ichimokuKinkoHyo.ChikouSpan.LastValue);
     Print("KijunSen Value = {0}", ichimokuKinkoHyo.KijunSen.LastValue);
     Print("SenkouSpanA Value = {0}", ichimokuKinkoHyo.SenkouSpanA.LastValue);
     Print("SenkouSpanB Value = {0}", ichimokuKinkoHyo.SenkouSpanB.LastValue);
     Print("TenkanSen Value = {0}", ichimokuKinkoHyo.TenkanSen.LastValue);
     //...
 }

IchimokuKinkoHyo (2 of 3)

Summary

Ichimoku Kinko Hyo Indicator is a moving average based trend identification system.

Remarks

Ichimoku Kinko Hyo Indicator contains more data points than standard candlestick charts and thus provides a clearer picture of potential price action.

Signature

1
public abstract IchimokuKinkoHyo IchimokuKinkoHyo(Bars bars, int tenkanSenPeriods, int kijunSenPeriods, int senkouSpanBPeriods)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
tenkanSenPeriods int The period used for the Tenkan Sen
kijunSenPeriods int The period used for the Kijun Sen
senkouSpanBPeriods int The period used for the Senkou Span B

Return Value

IchimokuKinkoHyo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
 //...
 private IchimokuKinkoHyo ichimokuKinkoHyo;
 //...
 protected override void OnStart()
 {
     ichimokuKinkoHyo = Indicators.IchimokuKinkoHyo
         (Bars, tenkanSenPeriods, kijunSenPeriods, senkouSpanBPeriods);
 }
 protected override void OnBar()
 {
     Print("ChikouSpan Value = {0}", ichimokuKinkoHyo.ChikouSpan.LastValue);
     Print("KijunSen Value = {0}", ichimokuKinkoHyo.KijunSen.LastValue);
     Print("SenkouSpanA Value = {0}", ichimokuKinkoHyo.SenkouSpanA.LastValue);
     Print("SenkouSpanB Value = {0}", ichimokuKinkoHyo.SenkouSpanB.LastValue);
     Print("TenkanSen Value = {0}", ichimokuKinkoHyo.TenkanSen.LastValue);
     //...
 }

IchimokuKinkoHyo (3 of 3)

Signature

1
public abstract IchimokuKinkoHyo IchimokuKinkoHyo(MarketSeries marketSeries, int tenkanSenPeriods, int kijunSenPeriods, int senkouSpanBPeriods)

Parameters

Name Type Description
marketSeries MarketSeries
tenkanSenPeriods int
kijunSenPeriods int
senkouSpanBPeriods int

Return Value

IchimokuKinkoHyo

AwesomeOscillator (3)

AwesomeOscillator (1 of 3)

Summary

Initializes the AwesomeOscillator indicator instance

Signature

1
public abstract AwesomeOscillator AwesomeOscillator()

Return Value

AwesomeOscillator

AwesomeOscillator (2 of 3)

Summary

Initializes the AwesomeOscillator indicator instance by passing the bars

Signature

1
public abstract AwesomeOscillator AwesomeOscillator(Bars bars)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars

Return Value

AwesomeOscillator

AwesomeOscillator (3 of 3)

Signature

1
public abstract AwesomeOscillator AwesomeOscillator(MarketSeries marketSeries)

Parameters

Name Type Description
marketSeries MarketSeries

Return Value

AwesomeOscillator

AcceleratorOscillator (3)

AcceleratorOscillator (1 of 3)

Summary

Initializes the AcceleratorOscillator indicator instance

Signature

1
public abstract AcceleratorOscillator AcceleratorOscillator()

Return Value

AcceleratorOscillator

AcceleratorOscillator (2 of 3)

Summary

Initializes the AcceleratorOscillator indicator instance

Signature

1
public abstract AcceleratorOscillator AcceleratorOscillator(Bars bars)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars

Return Value

AcceleratorOscillator

AcceleratorOscillator (3 of 3)

Signature

1
public abstract AcceleratorOscillator AcceleratorOscillator(MarketSeries marketSeries)

Parameters

Name Type Description
marketSeries MarketSeries

Return Value

AcceleratorOscillator

KeltnerChannels (3)

KeltnerChannels (1 of 3)

Summary

Initializes the Keltner Channels indicator instance

Signature

1
public abstract KeltnerChannels KeltnerChannels(int maPeriod, MovingAverageType maType, int atrPeriod, MovingAverageType atrMaType, double bandDistance)

Parameters

Name Type Description
maPeriod int Moving Average Period
maType MovingAverageType Moving Average Type
atrPeriod int Average True Range Period
atrMaType MovingAverageType Average True Range MAType
bandDistance double ATR Multiplier

Return Value

KeltnerChannels

KeltnerChannels (2 of 3)

Summary

Initializes the Keltner Channels indicator instance

Signature

1
public abstract KeltnerChannels KeltnerChannels(Bars bars, int maPeriod, MovingAverageType maType, int atrPeriod, MovingAverageType atrMaType, double bandDistance)

Parameters

Name Type Description
bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
maPeriod int Moving Average Period
maType MovingAverageType Moving Average Type
atrPeriod int Average True Range Period
atrMaType MovingAverageType Average True Range MAType
bandDistance double ATR Multiplier

Return Value

KeltnerChannels

KeltnerChannels (3 of 3)

Signature

1
public abstract KeltnerChannels KeltnerChannels(MarketSeries marketSeries, int maPeriod, MovingAverageType maType, int atrPeriod, MovingAverageType atrMaType, double bandDistance)

Parameters

Name Type Description
marketSeries MarketSeries
maPeriod int
maType MovingAverageType
atrPeriod int
atrMaType MovingAverageType
bandDistance double

Return Value

KeltnerChannels

AverageDirectionalMovementIndexRating

Summary

The Average Directional Movement Index Rating (ADXR) measures the strength of the Average Directional Movement Index (ADX).It's calculated by taking the average of the current ADX and the ADX from one time period before.

Signature

1
public abstract AverageDirectionalMovementIndexRating AverageDirectionalMovementIndexRating(int periods)

Parameters

Name Type Description
periods int The Period of AverageDirectionalMovementIndexRating

Return Value

AverageDirectionalMovementIndexRating

Alligator

Summary

Legendary trader Bill Williams, an early pioneer of market psychology, developed the trend-following Alligator indicator,which follows the premise that financial markets and individual securities trend just 15% to 30% of the time while grinding through sideways ranges the other 70% to 85% of the time.

Signature

1
public abstract Alligator Alligator(int jawsPeriods, int jawsShift, int teethPeriods, int teethShift, int lipsPeriods, int lipsShift)

Parameters

Name Type Description
jawsPeriods int The jaws period of Alligator
jawsShift int The jaws shift of Alligator
teethPeriods int The teeth period of Alligator
teethShift int The teeth shift of Alligator
lipsPeriods int The lips period of Alligator
lipsShift int The lips shift of Alligator

Return Value

Alligator

CenterOfGravity

Summary

The Center of Gravity (COG) indicator is a technical indicator developed by John Ehlers in 2002, used to identify potential turning points in the price as early as possible.

Signature

1
public abstract CenterOfGravity CenterOfGravity(int length)

Parameters

Name Type Description
length int The length of CenterOfGravity

Return Value

CenterOfGravity

CyberCycle

Summary

The Cyber Cycles Oscillator is an indicator designed by John Ehlers, it is used for isolating the cycle component of the market from its trend counterpart.

Signature

1
public abstract CyberCycle CyberCycle(double alpha)

Parameters

Name Type Description
alpha double CyberCycle Alpha

Return Value

CyberCycle

Fractals

Summary

The fractal indicator is a trading indicator used in technical analysis that is used to identify potential trend reversal points in a market.

Signature

1
public abstract Fractals Fractals(int periods)

Parameters

Name Type Description
periods int Fractals Period

Return Value

Fractals

PolynomialRegressionChannels

Summary

Polynomial Regression Channel (PRC) is an RTX Extension indicator that draws a best fit n-degree polynomial regression line through a recent period of data.

Signature

1
public abstract PolynomialRegressionChannels PolynomialRegressionChannels(int degree, int periods, double standardDeviation, double standardDeviation2)

Parameters

Name Type Description
degree int The degree of PolynomialRegressionChannels
periods int The period of PolynomialRegressionChannels
standardDeviation double The first standardDeviation of PolynomialRegressionChannels
standardDeviation2 double The second standardDeviation of PolynomialRegressionChannels

Return Value

PolynomialRegressionChannels

Supertrend

Summary

Supertrend is one of the most popular trend trading indicators

Signature

1
public abstract Supertrend Supertrend(int periods, double multiplier)

Parameters

Name Type Description
periods int Supertrend Period
multiplier double Supertrend Multiplier

Return Value

Supertrend

TickVolume

Summary

Tick Volume gives you the number of ticks for each bar.

Signature

1
public abstract TickVolume TickVolume()

Return Value

TickVolume