> For the complete documentation index, see [llms.txt](https://help.quantower.com/quantower/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.quantower.com/quantower/analytics-panels/chart/technical-indicators/oscillators/moving-average-convergence-divergence.md).

# MACD (Moving Average Convergence/Divergence)

## Description

The moving average convergence/divergence (MACD) indicator graphically depicts the difference between fast and slow exponential moving averages. The third line is called a “signal line”. Common periods of moving averages are: 26 for a slow EMA, 12 for a fast and 9 for a signal line.

![](/files/-LEFanz79vU5YnuRSXN5)

## Formula

Fast EMA - Slow EMA

## Most useful cases

* **Divergence/Convergence** - Divergence/Convergence pattern is a form of price action when new high(low) on the price scale not confirmed with a new high of  MACD. Such price and indicator’s behavior can be interpreted as the weakness of current existing trend.

![](/files/-LEFYgqOaFu04fcJfStC)

* **Crossover** - Crossover pattern occurs when MACD value crosses the signal line upward or downward. This signal can be used as a trigger to open buy/sell position.
* **Crossing zero line** - this is a trend reversing signal and it can be very useful in case of determining a correction of existing trend, beginning of a new trend wave or starting a new trend.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.quantower.com/quantower/analytics-panels/chart/technical-indicators/oscillators/moving-average-convergence-divergence.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
