Skip to main content

Stepgain

The Stepgain method tracks market prices and trends, and executes trades when the trend reverses. When a downtrend switches to an uptrend, Stepgain will buy, allowing you to purchase shortly after the price has hit its bottom. Conversely, when an uptrend becomes a downtrend, Stepgain will sell.

To determine when to buy with Stepgain, Gunbot uses EMA (Exponential Moving Average). After a set percentage below the lowest EMA is reached, Gunbot will start looking for a trend reversal. Trends are calculated automatically by XTrend and are visible in your logs. XTrend results can vary depending on your setting for PERIOD. Using XTrend is optional, you can also have stepgain trigger purely on price reversals above/below the configured level.

If you'd like added confirmation before executing trades, you can choose to use indicators such as RSI or Stochastic. These allow you to only buy or sell when both a trend reversal and a specific indicator level occur. This can help reduce risk and make trading decisions more reliable.

How to work with it​

Buy method conditions​

A buy order is allowed when price is within the configured buy levels, and a trend direction change is detected.

Sell method conditions​

A sell order is allowed when price is within the configured sell levels, and a trend direction change is detected. Additionally the gain % target must be reached.

Trading example​

StepGain strategy example showing trend-based trading performance

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

The infographic below describes what triggers trades with this strategy.

StepGain strategy diagram illustrating buy and sell trigger conditions

In this example both BUYLVL and SELLLVL would be set to 2. A change of price movement direction is assumed a trend reversal in this example, in reality not every change of price direction will be considered a trend reversal because the strength of the trend is considered as well.

Stepgain settings​

Buy settings​

LabelConfig ParameterDefault ValueDetailed Description
Buy enabledBUY_ENABLEDtrueWhen enabled, this setting allows the strategy to initiate buy or long orders.
Stepgain buy lvlBUYLVL1Selects the step level for initiating a buy. You can choose from level 1, 2, or 3 depending on your strategy needs.
Stepgain buy lvl 1BUYLVL10.3Defines the first level percentage below the lowest Exponential Moving Average (EMA) to place a buy order. T
Stepgain buy lvl 2BUYLVL21Defines the second level percentage below the lowest EMA for buying.
Stepgain buy lvl 3BUYLVL32This setting defines the third level percentage below the lowest EMA where you might consider placing a buy order.

Sell settings​

LabelConfig ParameterDefault ValueDetailed Description
Sell enabledSELL_ENABLEDtrueWhen enabled, this setting allows the strategy to execute sell or short orders.
Stepgain sell lvlSELLLVL1Selects the step level for selling. Options available are level 1, 2, or 3, allowing you to customize your selling strategy based on your risk preference.
Stepgain sell lvl 1SELLLVL10.3Defines the first level percentage above the break-even point to initiate a sell order.
Stepgain sell lvl 2SELLLVL21Defines the second level percentage above the break-even for selling.
Stepgain sell lvl 3SELLLVL32Specifies the third level percentage above the break-even point for selling.
Count sellCOUNT_SELL9999Disable trading on a specific pair after a set number of sell orders have been executed. This number can range from 1 to 999999, enabling strategic exits from trading pairs after certain activity levels.

Indicators​

LabelConfig ParameterDefault ValueDetailed Description
PeriodPERIOD15The period setting determines the "size" of candlesticks used in calculating indicators. Ensure the selected value, which represents minutes, is supported by your exchange.
Medium EMAEMA116Defines the number of candlesticks used to calculate the medium Exponential Moving Average (EMA), helping to analyze market trends over a specified number of periods.
Fast EMAEMA28Defines the number of candlesticks used to calculate the fast EMA, providing quicker insights into market movements for more reactive trading decisions.

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
Stepgain Buy LvlStrategy buyStrategy sell, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback
Stepgain Buy Lvl 1Strategy buyStrategy sell, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback
Stepgain Buy Lvl 2Strategy buyStrategy sell, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback
Stepgain Buy Lvl 3Strategy 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
Stepgain Sell LvlStrategy sellStrategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit
Stepgain Sell Lvl 1Strategy sellStrategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit
Stepgain Sell Lvl 2Strategy sellStrategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit
Stepgain Sell Lvl 3Strategy sellStrategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit
PeriodStrategy sell, Strategy buy, DCA buy (trigger)RT buy, RT buyback, RT sell, Close, Stop limit
Slow EMAStrategy buyRT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy
Medium EMAStrategy buyRT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy
XTrend EnabledStrategy buyRT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy