Introduction of MACD Trading Strategy on Bonfida Bots

What is MACD?

Moving average convergence and divergence is one of the most popular and widely used indicators in secondary market trading. It is mainly based on the exponential moving average to determine the moving trend of the underlying asset.
Components of MACD: Two lines (the MACD line and the signal line), and one histogram.
MACD Line: It is the 12-day exponential moving average (EMA) minus the 26-day exponential moving average. Compared with the simple moving average, the exponential moving average places more emphasis on recent prices and could better reflect price fluctuations in the short term. By utilizing 12-day EMA minus 26-day EMA, MACD line could capture the short term capital flow in a more precise way. If the MACD line is greater than zero, the trend of buying in the short term is relatively stronger.
Signal Line: It is the 9-day exponential moving average of the MACD line. When the MACD line crosses the signal line, it sometimes indicates that the market trend may start to reverse, especially when it occurs in an area far from the zero axis.
Histograms: It vividly captures the difference between MACD line and signal line.
(1M BTC/USD MACD Chart, source form TradingView)
Some common MACD indicators
  1. 1.
    The histogram goes from negative to positive: Long underlying asset
  2. 2.
    The histogram goes from positive to negative: Short underlying asset
  3. 3.
    The MACD line crosses the signal line downwardly: Longs start to close their positions
  4. 4.
    The signal line crosses the MACD line upwardly: Shorts start to close their positions
(for more information regarding MACD strategy, please go to
Introduction of Bonfida’s MACD Strategy Bots
On the explore page, we have created four daily MACD strategy bots of BTC, ETH, SRM and FIDA.

Daily MACD Strategy Bots

  • Initial deposits were USDC when those pools were created.
  • When the histogram goes from negative to positive, the pool will use all its assets to buy the base currency (BTC/ETH/SRM/FIDA).
  • When the histogram goes from positive to negative, the pool will sell all of the base currency (BTC/ETH/SRM/FIDA).
  • The order size is 100% of what is available in the pool.
(please kindly note that it’s an immediate-or-cancel order, meaning under the situation of thin liquidity, the order may not get filled completely. The unfilled part would get canceled. )
Now let’s take a close look at the MACD FIDA bot
For those who want to build their own MACD bots, and want to use the MACD line or the signal line as trading alerts, please kindly refer to our video tutorial and integrate those indicators with TradingView.
Bonfida Bots documentation:
Last modified 1mo ago