This strategy is based on EMA, enabling Gunbot to buy when the price reaches a point below the lowest EMA and sell as soon as a set percentage of gain is reached.
To refine this strategy, other indicators are available to be used as confirmation for both buying and selling. For example you could have Gunbot buy when both the price is below EMA and RSI is 30 or lower.
Some extra features are available for users of Gunbot Standard edition and higher. These are marked below.
Example of how trading with the gain strategy can perform. Details and settings
The infographic below describes what triggers trades with this strategy.
Following settings options are available for gain
and can be set in the strategy configurator of the GUI or the strategies section of the config.js file.
These settings are global and apply to all pairs running this strategy. When you want a specific parameter to be different for one or more pairs, use an override at the pair level.
Using the BUY_METHOD
and SELL_METHOD
parameters you can combine different methods for buying and selling. This strategy page assumes both BUY_METHOD
and SELL_METHOD
are set to gain
. Accepted values are all strategy names as listed here.
Buy settings are the primary trigger for buy orders. These parameters control the execution of buy orders when using gain
as buy method.
Set this to false to prevent Gunbot from placing buy orders.
Values: true or false
Default value: true
Affects | Does not affect |
Strategy buy | Strategy sell |
DCA buy | Stop limit |
RT buy | Close |
RT buyback | RT sell |
Parameter name in config.js
: BUY_ENABLED
This sets the target for buying at a percentage below the lowest EMA.
When you set this to 1, buy orders will only be placed when the current price is at least 1% below the currently lowest EMA.
Values: numerical, represents a percentage.
Default value: 1
Affects | Does not affect |
Strategy buy | Strategy sell |
| Stop limit |
| Close |
| RT sell |
| DCA buy |
| RT buy |
| RT buyback |
Parameter name in config.js
: BUY_LEVEL
"Never Buy Above". Use this to only allow buy orders below the last sell rate.
This sets the minimum percentage difference between the last sell order and the next buy. The default setting of 0 disables this option.
When set to 1, Gunbot will only place a buy order when the strategy buy criteria meet and price is at least 1% below the last sell price.
Values: numerical, represents a percentage.
Default value: 0
Affects | Does not affect |
Strategy buy | Strategy sell |
| Stop limit |
| Close |
| RT sell |
| DCA buy |
| RT buy |
| RT buyback |
Parameter name in config.js
: NBA
With this setting enabled, Gunbot will try to take any buy chance between the strategy entry point and your setting for TBUY_RANGE
.
As soon as the ask price drops below the upper border of this range (called "Take Buy"), it will trail down with a range of TBUY_RANGE
and place a buy order as soon as the ask price crosses up "Take Buy". Confirming indicators in use are respected.
Normal strategy buy orders are still possible while using TAKE_BUY
.
This option should not be used together with reversal trading.
Values: true or false
Default value: false
Affects | Does not affect |
Strategy buy | Strategy sell |
| Stop limit |
| Close |
| RT sell |
| DCA buy |
| RT buy |
| RT buyback |
Parameter name in config.js
: TAKE_BUY
This sets the buy range for TAKE_BUY
.
When set to 0.5, the initial trailing stop is set 0.5% above the entry point defined by BUY_LEVEL
.
Values: numerical, represents a percentage.
Default value: 0.5
Affects | Does not affect |
Strategy buy | Strategy sell |
| Stop limit |
| Close |
| RT sell |
| DCA buy |
| RT buy |
| RT buyback |
Parameter name in config.js
: TBUY_RANGE
Sell settings are the primary trigger for sell orders. These parameters control the execution of sell orders when using bb
as sell method.
Set this to false to prevent Gunbot from placing sell orders.
Values: true or false
Default value: true
Affects | Does not affect |
Strategy sell | Strategy buy |
Stop limit | RT buy |
RT sell | RT buyback |
| Close |
| DCA buy |
Parameter name in config.js
: SELL_ENABLED
This sets the target for selling. Gunbot will sell once price reaches the set percentage above the break-even point.
If you want to have at least 2% profit per trade, set this to 2. A sell order will be placed when the current price is at least 2% higher than the average bought price.
Values: numerical – represents a percentage.
Default value: 0.5
Affects | Does not affect |
Strategy sell | Strategy buy |
| RT buy |
| RT buyback |
| RT sell |
| Close |
| DCA buy |
| Stop limit |
| |
Parameter name in config.js
: GAIN
With this setting enabled, Gunbot will try to take any possible profit between the break-even point and your strategy exit point. This can be useful, for example, on days where the markets move very slowly.
It works by trailing prices upwards between the break-even point and the strategy exit point, with a configurable range for trailing: TP_RANGE
. A sell order will be placed when the trailing stop limit is hit or strategy sell conditions are reached. Confirming indicators in use are respected.
Sells at minimal loss are possible when using TAKE_PROFIT
, acting as a sort of mini stop loss.
This option should not be used together with reversal trading and DOUBLE_CHECK_GAIN
Values: true or false
Default value: false
Affects | Does not affect |
Strategy sell | Strategy buy |
| RT buy |
| RT buyback |
| RT sell |
| Close |
| DCA buy |
| Stop limit |
| |
Parameter name in config.js
: TAKE_PROFIT
This sets the sell range for TAKE_PROFIT
.
When set to 0.5, the initial trailing stop is set 0.5% below the break-even point.
Values: numerical – represents a percentage.
Default value: 0.5
Affects | Does not affect |
Strategy sell | Strategy buy |
| RT buy |
| RT buyback |
| RT sell |
| Close |
| DCA buy |
| Stop limit |
| |
Parameter name in config.js
: TP_RANGE
Enable this to only allow sell orders above the break-even point.
Values: true or false
Default value: false
Affects | Does not affect |
Strategy sell | Strategy buy |
| RT buy |
| RT buyback |
| RT sell |
| Close |
| DCA buy |
| Stop limit |
| |
Parameter name in config.js
: TP_PROFIT_ONLY
This is an extra check that looks at your recent trading history to verify GAIN
will be reached before placing a sell order.
Values: true or false
Default value: true
Affects | Does not affect |
Strategy sell | Strategy buy |
| RT buy |
| RT buyback |
| RT sell |
| Close |
| DCA buy |
| Stop limit |
| |
Parameter name in config.js
: DOUBLE_CHECK_GAIN
Relevant indicators for trading with gain.
These settings have a direct effect on trading with gain
, because BUY_LEVEL
is dependant on EMA.
This sets the candlestick period used for trading, this affects all indicators within the strategy.
Only use supported values.
Setting a short period allows you to trade on shorter trends, but be aware that these will be noisier than longer periods.
Values: numerical– represents candlestick size in minutes.
Default value: 15
Affects | Does not affect |
Strategy sell | RT buy |
Strategy buy | RT buyback |
DCA buy (when using an indicator to trigger) | RT sell |
| Close |
| Stop limit |
Parameter name in config.js
: PERIOD
Set this to the amount of candlesticks you want to use for your slow EMA. The closing price for each candle is used in the slow EMA calculation.
For example: when you set PERIOD
to 5, and want to use 2h for slow EMA – you need to set EMA1
to 24 (24 * 5 mins).
Values: numerical – represents a number of candlesticks.
Default value: 16
Affects | Does not affect |
Strategy buy | RT buy |
| RT buyback |
| RT sell |
| Close |
| Stop limit |
| Strategy sell |
| DCA buy |
Parameter name in config.js
: EMA1
Set this to the amount of candlesticks you want to use for your fast EMA. The closing price for each candle is used in the fast EMA calculation.
For example: when you set PERIOD
to 5, and want to use 1h for fast EMA – you need to set EMA2
to 12 (12 * 5 mins).
Values: numerical – represents a number of candlesticks.
Default value: 8
Affects | Does not affect |
Strategy buy | RT buy |
| RT buyback |
| RT sell |
| Close |
| Stop limit |
| Strategy sell |
| DCA buy |
Parameter name in config.js
: EMA2
This is not available for Gunbot Starter.
Parameters to configure additional trailing for various types of orders. Trailing works just like it does for the TSSL strategy, the difference being the starting point of trailing.
Orders resulting from trailing are only placed when the main strategy criteria are met, and confirming indicators (if any) allow the order. All these conditions must occur in the same cycle.
This is not available for Gunbot Starter.
This is not available for Gunbot Starter.
This is not available for Gunbot Starter.
The following parameters in config.js
have no function for this strategy and act as placeholder.
Parameter | Description |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |
| Placeholder. |