MacdHistogram


Summary

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

Syntax

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

Parameters

NameDescription

Example 1

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];
    //...
}