Skip to main content

MACD (futures)

This approach utilizes the MACD indicator, which identifies possible shifts in momentum by analyzing signals.

The Moving Average Convergence Divergence (MACD) is a technical indicator that helps traders determine potential changes in an asset's momentum. The indicator is based on the convergence and divergence of two exponential moving averages, typically a 12-period EMA and a 26-period EMA. Traders use the MACD to identify whether an asset is likely to experience a bullish or bearish trend, as well as potential trend reversals. When the MACD line crosses above the signal line, it is considered a buy signal, while a crossover below the signal line indicates a sell signal.

How to work with it

Gunbot will open one position, either long or short, and close this position when the target is reached. When the stop is hit before profitably closing a trade, Gunbot will place a stop order at loss. After closing a position, Gunbot will again look to open a new long or short position. Gunbot will not add to existing open positions.

Buy method conditions

Opening a long position is allowed when MACD crosses up the signal line.

Sell method conditions

Opening a short position is allowed when MACD crosses down the signal line.

Conditions to close

Position is closed when the desired ROE (return on equity) is reached. This is a percentage from the entry point, taking leverage into consideration.

Conditions to stop

A position is closed at loss when negative ROE reaches the STOP_LIMIT target.

Strategy settings for MACD (futures)

Long settings

LabelConfig ParameterDefault ValueDetailed Description
Buy enabledBUY_ENABLEDtrueWhen enabled, you can execute buy or long orders. This allows you to enter the market with a purchase when your strategy conditions are met.

Short settings

LabelConfig ParameterDefault ValueDetailed Description
Sell enabledSELL_ENABLEDtrueWhen enabled, you can execute sell or short orders. This enables you to exit the market or initiate a short sell when your strategy conditions indicate.

Indicators

LabelConfig ParameterDefault ValueDetailed Description
PeriodPERIOD15The period setting defines the size of the candlesticks in minutes that are used for indicator calculation. It is crucial to select a period supported by your exchange to ensure accurate data feed and indicator analysis.
MACD shortMACD_SHORT5The MACD short term setting specifies the number of candles used to calculate the short-term moving average for MACD. This setting affects how quickly the MACD reacts to price changes, with lower values resulting in a more sensitive indicator.
MACD longMACD_LONG20The MACD long term setting determines the number of candles used to calculate the long-term moving average for MACD. A higher number here means the moving average will be less sensitive to recent price changes, providing a smoother overall trend indicator.
MACD signalMACD_SIGNAL10The MACD signal setting controls the number of candles used to calculate the MACD Signal line. This line is used as a trigger for buy and sell signals and is critical for determining the momentum behind a price movement.