Skip to main content

Gain

Gunbot uses the Exponential Moving Average (EMA) method to determine when to buy and. Specifically, it buys when the price dips below the lowest EMA and sells once a set percentage of profit is achieved.

EMA is a technical analysis indicator that calculates the average price of an asset over a specified time period, with more weight given to recent prices. This makes it more responsive to changes in the price trend compared to a Simple Moving Average (SMA). Traders often use EMAs to identify potential buy or sell signals, as crossovers between different EMAs can be indicative of market trends. Additionally, EMAs can help smooth out short-term fluctuations in price data, making it easier to spot long-term trends.

How to work with it

Buy method conditions

A buy order is allowed when price is at least buy level % below both slow EMA and fast EMA.

Sell method conditions

A sell order is allowed when gain % profit is reached.

Trading example

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

The infographic below describes what triggers trades with this strategy.

The settings used in the example are not recommended.

Buy settings

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

Take Buy is only available for Gunbot Standard and higher.

Buy enabled

Set this to false to prevent Gunbot from placing buy orders.


Buy Level

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.


Sell settings

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

Sell enabled

Set this to false to prevent Gunbot from placing sell orders.


Gain

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.


Indicator settings

Relevant indicators for trading with gain.

These settings have a direct effect on trading with gain, because BUY_LEVEL is dependant on EMA.

Period

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.


Slow EMA

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).


Medium EMA

Set this to the amount of candlesticks you want to use for your medium 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 medium EMA – you need to set EMA2 to 12 (12 * 5 mins).