---
id: "P:cAlgo.API.Indicators.MacdHistogram.Histogram"
kind: "property"
type: "T:cAlgo.API.Indicators.MacdHistogram"
url: "https://help.ctrader.com/ctrader-algo/references/Indicators/MacdHistogram/Histogram/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# MacdHistogram.Histogram

Member of [MacdHistogram](https://help.ctrader.com/ctrader-algo/references/Indicators/MacdHistogram/index.md).

## Histogram

The histogram (bar graph). The difference between the short and long cycles.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
IndicatorDataSeries Histogram {get;}
```

Python:

```python
macdHistogram.Histogram: IndicatorDataSeries
```

### Returns

`IndicatorDataSeries` — 

### Examples

C#:

```csharp
var macd = Indicators.MacdHistogram(Bars.ClosePrices, 26, 12, 9);
if (macd.Histogram.Last(1) > 0 && macd.Histogram.Last(2) <= 0)
    Print("MACD histogram turned positive: {0}", macd.Histogram.Last(1));
```

Python:

```python
macd = api.Indicators.MacdHistogram(api.Bars.ClosePrices, 26, 12, 9)
if macd.Histogram.Last(1) > 0 and macd.Histogram.Last(2) <= 0:
    api.Print(f"MACD histogram turned positive: {macd.Histogram.Last(1)}")
```

