< All Topics
Print

macd histogram

This approach relies on the MACD histogram, which is a technical indicator used to track trends. Specifically, it leverages signals that suggest a crossover is probable when the MACD signal line reaches a certain point.

The MACD histogram, short for Moving Average Convergence Divergence histogram, is a popular tool used by traders to identify potential buy and sell signals in a stock’s price chart. It is created by subtracting the 26-period exponential moving average (EMA) from the 12-period EMA, resulting in a line that oscillates above and below a zero line. When the MACD line crosses above the signal line (a 9-period EMA of the MACD), it is seen as a bullish signal, while a cross below indicates a bearish signal.

The MACD histogram takes this analysis one step further by plotting the difference between the MACD line and the signal line as bars above and below the zero line. This makes it easier to identify changes in momentum and confirm trend reversals.

How to work with it
Buy method conditions
A buy order is allowed when the MACD histogram crosses up the zero line.

TIP
Normal constraints like “buy once, sell once” don’t apply to this strategy: each time buying criteria occur, AILidex will place a buy order as high as set in your balance settings.

Sell method conditions
A sell order is allowed when the MACD histogram drops below 0.

INFO
Gain protection is optional for this strategy. Be aware that this can lead to sell orders below your break-even point.

Trading example

Example of how trading with this strategy can perform. Details and settings

The infographic below describes what triggers trades with this strategy.

Buy settings
Buy settings are the primary trigger for buy orders. These parameters control the execution of buy orders when using macdh as buy method.

Buy enabled
Description
Values
Order types
Name
Set this to false to prevent AILidex from placing buy orders.

Single Buy
Description
Values
Order types
Name
Enable this to restrict macdh to placing just a single buy order on the first crossup, then it will go in sell mode.

Useful when you combine macdh with a different sell method or use other parameters that prevents sell orders from happening at every crossdown.

Sell settings
Sell settings are the primary trigger for sell orders. These parameters control the execution of sell orders when using macdh as sell method.

Sell enabled
Description
Values
Order types
Name
Set this to false to prevent AILidex from placing sell orders.

Gain
Description
Values
Order types
Name
This sets the minimum target for selling when DOUBLE_CHECK_GAIN is enabled.

Indicator settings
Relevant indicators for trading with MACD.

These settings have a direct effect on trading with macdh.

Period
Description
Values
Order types
Name
This sets the candlestick period used for trading, this affects all indicators within the strategy.

Only use supported values. The trading settings editor suggests valid values for the selected exchange..

Setting a short period allows you to trade on shorter trends, but be aware that these will be noisier than longer periods.

MACD Short
Description
Values
Order types
Name
The number of periods used for calculating the short-term moving average for MACD.

MACD Long
Description
Values
Order types
Name
The number of periods used for calculating the long-term moving average for MACD.

MACD Signal
Description
Values
Order types
Name
The number of periods used for calculating the MACD signal line.

Table of Contents