Gain (futures)
Gunbot uses Exponential Moving Averages (EMA) to determine entries. It buys when price reaches the configured EMA-based levels and sells once the configured profit target is met.
How to work with it
This page explains how futures trading operates with the gain method. The triggers for trades differ slightly from those used in spot trading.
Gunbot opens a single position, either long or short, and closes it when the target is met. If the stop is triggered before closing the trade at a profit, Gunbot places a stop order at a loss. After closing a position, Gunbot seeks to open a new long or short position.
Buy method conditions
Trend following (regular)

Opening a long position is allowed when the ask price is equal to or above LONG_LEVEL.
Mean reversion

Opening a long position is allowed when the ask price is equal to or below LONG_LEVEL.
Sell method conditions
Trend following (regular)

Opening a short position is allowed when the bid price is equal to or below SHORT_LEVEL.
Mean reversion

Opening a short position is allowed when the bid price is equal to or below SHORT_LEVEL.
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 Gain (futures)
Long settings
| Label | Config Parameter | Default Value | Detailed Description |
|---|---|---|---|
| Buy enabled | BUY_ENABLED | true | Allows you to enable or disable buy or long orders. If set to true, the strategy can initiate buy orders based on your settings. |
| Long level | LONG_LEVEL | 1 | Defines the percentage from the Exponential Moving Average (EMA) that allows long orders to be placed. |
Short settings
| Label | Config Parameter | Default Value | Detailed Description |
|---|---|---|---|
| Sell enabled | SELL_ENABLED | true | Allows you to enable or disable sell or short orders. When enabled, short orders can be initiated based on your trading parameters. |
| Short level | SHORT_LEVEL | 1 | Specifies the percentage from the Exponential Moving Average (EMA) required to enable short orders. This determines the point below which short positions may be opened. |
Indicators
| Label | Config Parameter | Default Value | Detailed Description |
|---|---|---|---|
| Period | PERIOD | 15 | Defines the time frame in minutes for each candlestick used in calculating indicators. The value should align with those supported by your exchange. |
| Medium EMA | EMA1 | 16 | Specifies the number of candlesticks used to calculate the medium Exponential Moving Average (EMA). |
| Fast EMA | EMA2 | 8 | Specifies the number of candlesticks used to calculate the fast Exponential Moving Average (EMA). |
| Mean reversion | MEAN_REVERSION | false | Enables the mean reversion variant for the selected buy and sell methods. |