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.

Strategy settings for Gain​

Buy settings​

LabelConfig ParameterDefault ValueDetailed Description
Buy enabledBUY_ENABLEDtrueWhen enabled, this setting allows the strategy to place buy or long orders.
Buy levelBUY_LEVEL1This setting defines the percentage below the lowest Exponential Moving Average (EMA) at which buy orders can be triggered.

Adjustable range is from 0.1% to 5%, making it flexible for varying market conditions.

Sell settings​

LabelConfig ParameterDefault ValueDetailed Description
Sell enabledSELL_ENABLEDtrueWhen enabled, this setting allows you to place sell or short orders within your trading strategy.
GainGAIN1This setting establishes a gain target above the break-even point, expressed as a percentage. It is adjustable between 0.1% to 5%, allowing for flexible profit goals.
Count sellCOUNT_SELL9999Defines the maximum number of sell orders allowed for a trading pair since its addition. Once this count is reached, the pair is disabled.

The range for this setting is from 1 to 999999 orders, providing a broad scale of operational control.

Indicators​

LabelConfig ParameterDefault ValueDetailed Description
PeriodPERIOD15The period setting determines the candlestick size in minutes that is used for calculating indicators. Make sure to use a period that is supported by your exchange.
Medium EMAEMA116This setting specifies the number of candles used to calculate the medium Exponential Moving Average (EMA). The range is from 2 to 50 candles, allowing for medium-term trend analysis.
Fast EMAEMA28The number of candles used for calculating the fast Exponential Moving Average (EMA) is defined here, with a range from 2 to 50 candles. This setting is vital for identifying short-term trends.

Overview of effects on different order types​

Config ParameterAffected Order TypesNot Affected Order Types
Buy EnabledStrategy buy, DCA buy, RT buy, RT buybackStrategy sell, Stop limit, Close, RT sell
Buy LevelStrategy buyStrategy sell, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback
Sell EnabledStrategy sell, Stop limit, RT sellStrategy buy, RT buy, RT buyback, Close, DCA buy
GainStrategy sellStrategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit
PeriodStrategy sell, Strategy buy, DCA buy (when using an indicator)RT buy, RT buyback, RT sell, Close, Stop limit
Slow EMA (EMA1)Strategy buyRT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy
Medium EMA (EMA2)Strategy buyRT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy