MACD
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​
Buy method conditions​
A buy order is allowed when the MACD line crosses up the signal line.
Normal constraints like "buy once, sell once" don't apply to this strategy: each time buying criteria occur, Gunbot will place a buy order as high as set in your balance settings.
Sell method conditions​
A sell order is allowed when the MACD line crosses down the signal line.
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.
Strategy settings for MACD​
Buy settings​
Label | Config Parameter | Default Value | Detailed Description |
---|---|---|---|
Buy enabled | BUY_ENABLED | true | Enables the ability to place buy or long orders. If enabled, you can initiate buy orders according to your strategy's criteria. |
Single buy | SINGLE_BUY | false | Limits the strategy to only one buy order. This setting is useful if you want to restrict the strategy to a single transaction per criteria fulfillment. |
Sell settings​
Label | Config Parameter | Default Value | Detailed Description |
---|---|---|---|
Sell enabled | SELL_ENABLED | true | Enables the ability to place sell or short orders. If enabled, you can execute sell orders based on your strategy's indicators. |
Double check gain | DOUBLE_CHECK_GAIN | true | Ensures that a positive gain is achieved before allowing a sell order. If disabled, the strategy can execute sell orders at a loss, based on other active indicators. |
Gain | GAIN | 1 | Specifies the target gain above the break-even point, as a percentage. Set your desired gain level to manage profitability expectations. |
Count sell | COUNT_SELL | 9999 | Limits the number of sell orders for a trading pair, potentially disabling the pair after reaching the specified count. Useful for controlling trading frequency and risk exposure. The practical range is from 1 to 50 sell orders, although technically you can set this up to 999999. |
Indicators​
Label | Config Parameter | Default Value | Detailed Description |
---|---|---|---|
Period | PERIOD | 15 minutes | Defines the timeframe of the candlesticks used for indicator calculations. Ensure you choose a period that is supported by your exchange. The period is specified in minutes. |
MACD short | MACD_SHORT | 5 | Determines the short-term moving average period for the MACD indicator. This setting influences how quickly the MACD responds to price changes. |
MACD long | MACD_LONG | 20 | Sets the long-term moving average period for the MACD indicator, affecting the indicator's sensitivity to longer-term price trends. The range is adjustable. |
MACD signal | MACD_SIGNAL | 10 | Specifies the number of candles used to calculate the MACD signal line, which helps to identify potential buy or sell signals based on the MACD. You can adjust this, with a standard setting of 10 candles for typical trading scenarios. |
Overview of effects on different order types​
Config Parameter | Affected Order Types | Not Affected Order Types |
---|---|---|
Buy Enabled | Strategy buy, DCA buy, RT buy, RT buyback | Strategy sell, Stop limit, Close, RT sell |
Single Buy | Strategy buy | Strategy sell, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback |
Sell Enabled | Strategy sell, Stop limit, RT sell | Strategy buy, RT buy, RT buyback, Close, DCA buy |
Gain | Strategy sell | Strategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit |
Period | Strategy sell, Strategy buy, DCA buy (when using an indicator) | RT buy, RT buyback, RT sell, Close, Stop limit |
MACD Short | Strategy sell, Strategy buy | RT buy, RT buyback, RT sell, Close, Stop limit, DCA buy |
MACD Long | Strategy sell, Strategy buy | RT buy, RT buyback, RT sell, Close, Stop limit, DCA buy |
MACD Signal | Strategy sell, Strategy buy | RT buy, RT buyback, RT sell, Close, Stop limit, DCA buy |