Skip to main content

Moving Average Convergence Divergence (MACD)

Understand how to use MACD with Capitalise.ai.

Josh avatar
Written by Josh
Updated yesterday

The Moving Average Convergence Divergence (MACD) is a momentum and trend-following technical indicator that shows the difference between the fast Exponential Moving Average (EMA) and the slow EMA of an asset’s price. The typical period for the fast EMA is 12 days, while the slow EMA is generally set to 26 days. The result of this calculation is the MACD itself.

A signal line, which is typically a 9-day EMA, is also calculated alongside the MACD.

How Can It Be Used Within the Capitalise Platform?

The following properties can be set for any given MACD:

  • Fast: The number of bars used to calculate the fast EMA. The default setting is 12.

  • Slow: The number of bars used to calculate the slow EMA. The default setting is 26.

  • Signal: The number of bars used to calculate the signal line. The default setting is 9.

  • Bar Period (BarPeriod): The period of time each bar represents. This can be set to 1 minute, 5 minutes, 15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours, Day, Week, or Month. The default setting is Day.

  • Bar Price (BarPrice): The price used to base the calculation of the EMA. You can choose between the open, close, high, low, or mid of each bar. The default setting is close.

The maximum number of bars that can be used when setting a condition (for fast, slow, or signal) using MACD is 200.

Please note, the current (open) bar is not included in the MACD calculation; only closed bars are considered.

When you write "MACD" within a strategy, a dialogue box will pop up, allowing you to configure these parameters. 

Here are a few examples of using MACD within Capitalise:

Buy 2,000 EUR/USD if the MACD Line(12, 26, 9, 15m, Open) of EUR/USD is above the zero line

Sell 15 AAPL if the MACD Line (12, 26, 9, Day, Close) of AAPL crosses below the signal line


Note: All screenshots and examples are for technical demonstration purposes only. They should not be considered as recommendations for any specific trading strategy, nor do they constitute any form of advice. Please click here for further explanation

Did this answer your question?