Runbot Documentation
How it worksIndicatorsTriggers BoxesNFTs
  • Introduction
  • Interactive Tutorial
  • HOW IT WORKS
    • Box synergies
    • Signal list
      • Long/Short signal
      • Cancel signal
      • Stop signal
      • Custom signal
    • Glossary
  • Parimutuels Markets
  • Strategy Boxes
    • Strategy list
    • Strategy management (Backtest box)
    • Signals Box
    • Selectors Box
    • Indicators box
      • Offset Candle
      • Signal creation
      • Signal duration rule
  • Indicators
    • Basic triggers
    • Runbot Indicators
      • RSI
      • Candle
      • MACD
      • MA
      • Stochastic
      • Streak
      • ATR
      • Bollinger Bands
      • Funding (8h Rates)
      • Orderflow
      • Liquidations
      • Pivot Points
      • ATR Bands
      • Fibonacci
      • CHOP
      • Potential Cumulative Liquidations
      • Open Interest
      • Volume Profile
      • Ichimoku
      • SAR
      • TD9
      • VWAP/MVWAP
      • Calendar
      • SuperTrend
      • CCI
      • Fear & Greed Index
      • MA Bands
      • Volume Anomaly
      • Orderbook
      • AI News Sentiment
    • #AI Indicators: Harmonia
    • VeloData Indicators
      • Aggregated Datas
        • Premium Index
        • Volume Index
      • Options Markets
        • Options Premium Index
        • Option Volume
        • Option Skew
        • Implied Volatility
        • Delta
        • Vega
        • Gamma
  • Triggers Boxes
    • Entry in position rules
      • Majority of signals
      • Unanimity of signals
      • Equality
      • Minimum number of signals
      • Maximum number of signals
      • No previous trade
    • Exit position rules
      • Stop %/ATR
      • Confirmation stop %/ATR
      • TP ATR %/ATR
      • TP/SL signal
      • Trailing %/ATR
      • Decaying TP %/ATR
      • Magnetic TP %/ATR
      • Stop candle %/ATR
      • TP Candle %/ATR
      • Number of candles
      • Opposite trade
    • Adjust position rules
      • Increase/Decrease order size
      • Delay between two triggers
      • Signals occurs
      • Max position size
  • Risk management Boxes
    • Position size
      • Leverage
      • Constant USD
      • Orderbook
      • Risk % capital per %/ATR
      • Risk constant USD per %/ATR
      • Candle distance
    • Entry in position methods
      • Market order
      • Slippage market
      • Sequential Market
      • Pyramid orders
      • Delay
  • Runbot NFTs
    • Connect your Web3 Wallet
    • Strategy NFTs
    • Mint Open-Source NFT
    • Mint Rental NFT
    • Community NFTs Indicators
      • Black Flamingo Indicators
      • Harmonia Indicators
      • VeloData Indicators
    • FAQ Marketplace & NFTs
  • Webhooks (Trading Bots)
    • BingX (free bots)
    • Bitget (free bots)
    • Phemex (free bots)
    • Blofin (free bots)
    • OKX
    • Bybit
    • Tealstreet
    • Mizar
    • WunderTrading
    • Alertatron
    • Zignaly
    • Discord
    • Custom URL
  • Advanced Tools
    • Strategies Composer
    • Strategy Optimiser
      • Random Search
      • Simulated annealing
      • Combinatorial
      • Tips to Optimize your strategy
  • Free plan and Credits
Powered by GitBook
On this page
  • Overview
  • Interpretation
  • Indicator Triggers:
  • MACD cross up/down level
  • Signal line cross up/down the MACD line
  • In zone
  • Notes

Was this helpful?

  1. Indicators
  2. Runbot Indicators

MACD

Moving Average Convergence Divergence indicator.

PreviousCandleNextMA

Last updated 5 months ago

Was this helpful?

Overview

The Moving Average Convergence Divergence (MACD) is a trend-following momentum indicator. It shows the relationship between two moving averages of a security’s price. The MACD is calculated by subtracting the 26-period Exponential Moving Average (EMA) from the 12-period EMA.

Interpretation

The MACD is interpreted as follows:

  • When the MACD line crosses above the signal line, it gives a bullish signal, indicating that it may be a good time to buy.

  • When the MACD line crosses below the signal line, it gives a bearish signal, indicating that it may be a good time to sell.

Indicator Triggers:

MACD cross up/down level

Signal line cross up/down the MACD line

In zone

Notes

1. Trend Following: Utilize MACD Line Crossovers

In trend-following strategies, pay attention to the crossovers between the MACD line and the signal line. When the MACD line crosses above the signal line, it indicates a potential start of an upward trend, signaling a buy opportunity. Conversely, when the MACD line crosses below the signal line, it suggests a potential downward trend, signaling a sell opportunity. Use these crossovers as entry and exit points in line with the identified trend direction.

2. Mean Reversion: Watch for MACD Divergences

For mean reversion strategies, look for divergences between the MACD indicator and the price movement. A bullish divergence occurs when the price makes a new low while the MACD forms a higher low, indicating a potential reversal to the upside. Conversely, a bearish divergence happens when the price makes a new high while the MACD forms a lower high, suggesting a possible reversal to the downside. These divergences can signal that the current price trend is losing momentum and may revert to the mean.

3. Combine MACD with Other Indicators

The MACD is more effective when used in conjunction with other technical indicators. For instance, you can combine MACD signals with support and resistance levels, trend lines, or volume indicators to confirm the validity of a trend or potential reversal. Using multiple indicators helps filter out false signals and improves the reliability of your trading decisions.

4. Adjust MACD Settings to Suit Different Market Conditions

Customize the MACD settings to fit different market environments and trading strategies. The standard settings (12, 26, 9) are commonly used, but adjusting these periods can make the MACD more responsive or smoother depending on the trading timeframe and market volatility. For shorter timeframes or more volatile markets, consider using shorter periods (e.g., 6, 13, 5) for quicker signals. For longer-term trends, longer periods (e.g., 24, 52, 18) can help smooth out the noise and provide clearer signals.

By leveraging these strategies and tips, you can effectively use the MACD indicator on Runbot to enhance your automated trading bot approach across various market conditions.

As soon as the MACD cross up the level 0, a long signal is triggered.
The MACD line cross up the level 0 at the green arrow, a long signal is triggered.
Place a long signal when the signal line cross down the MACD line.
A long signal is triggered once the signal line (discontinuous yellow line) cross down the MACD line (continuous green line), at the green arrow.
Place a short signal when the MACD is between [200;600]
As soon as the first candle closes in the red zone [200;600] a short signal is triggered, at the red arrow.