MacdCrossOver


Summary

Calculates a MACD (moving average convergence/divergence) Indicator

Remarks

MACD (moving average convergence/divergence) is used to spot changes in the strength, direction, momentum, and duration of a trend.

Syntax

public interface MacdCrossOver

Members

NameTypeSummary
Histogram PropertyThe Histogram (bar graph)
MACD PropertyThe main MACD line (blue line)
Signal PropertyThe Signal line of MACD (red line)

Example 1

//...
private MacdCrossOver _macdCrossOver;
[Output("MACD")]
public IndicatorDataSeries Macd { get; set; }
protected override void Initialize()
{
    _macdCrossOver = Indicators.MacdCrossOver(LongCycle, ShortCycle, Period); 
    //...
}
public override void Calculate(int index)
{
    Macd[index] = _macdCrossOver.MACD[index];
    //...
}