MacdCrossOver


Summary

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

Syntax

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

Parameters

NameDescription

Example 1

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