Published on: 2023-06-01
Updated on: 2024-04-26
MACD should first calculate the fast (usually 12 days) Moving Average value and the slow (usually 26 days) moving average value in the application. Use these two values as the basis for measuring the "difference value" between the two (fast and slow lines).
The so-called "difference value" (DIF) refers to the 12 day EMA value minus the 26 day EMA value. Therefore, in the sustained upward trend, the 12th EMA is above the 26th EMA. The positive deviation value (+DIF) between them will become larger and larger. On the contrary, in a downward trend, the difference value may become negative (-DIF) and also increase.
As for the degree to which the positive or negative deviation value needs to be reduced when the market starts to turn around, it is truly a signal of market reversal. The reversal signal of MACD is defined as the 9-day moving average (9-day EMA) of the "difference value".

The calculation formula for MACD indicators involves three parts: a fast line, a slow line, and a bar chart.
1. Calculate the fast line (EMA12).
Firstly, it is necessary to calculate the 12-day average index (EMA12) of the closing price, which is:
EMA12=Previous day EMA12 x 11/13+ Today's closing price x 2/13
Among them, 11/13 and 2/13 are weighting coefficients that can be adjusted according to different analysis requirements.
2. Calculate the slow line (EMA26).
Next, it is necessary to calculate the 26-day average index (EMA26) of the closing price, which is:
EMA26=Previous day EMA26 x 25/27+ Today's closing price x 2/27
Similarly, 25/27 and 2/27 are weighted coefficients.
3. Calculate bar charts (DIF and DEA).
Finally, the difference between the fast and slow lines can be used as a bar chart (DIF) to measure price momentum and trend changes while also calculating the 9-day moving average (DEA) of the DIF, which is:
DEA=previous day's DEA x 8/10 + today's DIF x 2/10
Finally, the calculation formula for MACD indicators can be expressed as:
MACD=DIF-DDEA
Its IF is the difference between the fast line and the slow line, DEA is the 9-day moving average of DIF, and MACD is the bar chart. It should be noted that the value of the MACD index can be positive, negative, or zero, and its size and direction reflect the change and trend intensity of market prices.
World's Best Broker
EBC Financial Group is a co-brand shared by a group of entities
including:
EBC Financial Group (SVG) LLC is authorized by the St.Vincent and the
Grenadines Financial Services Authority(SVGFSA),and the company
registration number is 353 LLC 2020, with registered address at Euro
House, Richmond Hill Road, Kingstown, VC0100, St. Vincent and the
Grenadines.
Other Relevant Entities
EBC Financial Group (UK) Limited is authorised and regulated by the
Financial Conduct Authority. Reference Number: 927552. Website: www.ebcfin.co.uk
EBC Financial Group (Cayman) Limited is licensed and regulated by the
Cayman Islands Monetary Authority (Number: 2038223). Website:
www.ebcgroup.ky
EBC Financial (MU) Limited is licensed and regulated by the the
Financial Services Commission, Mauritius (License Number GB24203273)
with registrated address at 3rd Floor, Standard Chartered Tower,
Cybercity, Ebene, 72201, Republic of Mauritius. Website for this entity
is maintained separately.
EBC Financial Group (Comoros) Limited is authorised by The Autonomous
Island of Anjouan, Union of Comoros Offshore Finance Authority with
License number L 15637/EFGC, with registered office address at Hamchako,
Mutsamudu, Autonomous Island of Anjouan, Union of Comoros.
EBC Financial Group (Australia) Pty Ltd (ACN: 619 073 237) is authorised
and regulated by the Australian Securities and Investments Commission
(Number: 500991). EBC Financial Group (Australia) Pty Ltd is a related
entity of EBC Financial Group (SVG) LLC. The two entities are managed
separately. The financial products and services offered on this website
are NOT provided by the Australian entity and no recourse against the
Australian entity is available.
EBC Group (Cyprus) Ltd, faciliates payment services to the licensed and
regulated entities within the EBC Financial Group strucutre, registered
under the Companies Law of Republic of Cyprus with the number HE 449205,
registered office address at 101 Gladstonos, Agathangelou Business
Centre, 3032 Limassol, Cyprus.
Business Address: The Leadenhall Building, 122 Leadenhall Street, London, United Kingdom, EC3V 4AB. Email Address :cs@ebc.com . Telephone : +44 20 3376 9662
Regional Restrictions:
EBC does not offer any services to citizens and residents of certain
jurisdictions including: Afghanistan, Belarus, Burma (Myanmar), Canada,
Central African Republic, Congo, Cuba, Democratic Republic of the Congo,
Eritrea, Haiti, Iran, Iraq, Lebanon, Libya, Malaysia, Mali, North Korea
(Democratic People's Republic of Korea), Russia, Somalia, Sudan, South
Sudan, Syria, Ukraine (including Crimea, Donetsk, and Luhansk Regions),
the United States, Venezuela, and Yemen.
Any Spanish on this website is for LATAM only and is not designated for
anyone in European Union or Spain For more information, please check out
our FAQs.
Any Portuguese on this website is for Africa only, and is not designated
for anyone in European Union or Portugal or Brazil. For more
information, please check out our FAQs.
Compliance Disclosure:The website can be accessed globally and is not specific to any entity. Your actual rights and obligations will be determined based on the entity and jurisdiction that you choose to be regulated.There may be local laws and regulations which prohibit or limit your rights to access, download, distribute, disseminate, share or otherwise use any or all of the documents and information published on this website.
Risk Warning: Trading Contracts for Difference (CFDs) are complex financial instruments and come with a high risk of losing money rapidly due to leverage. Trade on margin carries a high level of risk and may not be suitable for all investors. Before deciding to trade Forex and CFDs, you should carefully consider your trading objectives, level of experience and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial trading capital. We recommend that you seek independent advice and ensure you fully understand the risks involved before making any investment decision. Please read the relevant risk disclosure statements carefully before trading.