Skip to main content

StepGain Spot Trading Strategy

The StepGain method tracks market prices and trends, executing trades when a trend reversal is detected. It aims to buy when a downtrend transitions to an uptrend, ideally purchasing shortly after the price bottoms out. Conversely, StepGain sells when an uptrend shifts into a downtrend.

Info

Key Concepts for StepGain:

  • Exponential Moving Average (EMA): A type of moving average that gives more weight to recent prices, making it more responsive to new information. StepGain uses EMAs to establish baseline price levels.
  • XTrend: A Gunbot indicator that automatically analyzes price action to determine the prevailing market trend (uptrend, downtrend, or sideways). While optional, it can provide confirmation for trend reversals.

To identify buy points, StepGain utilizes Exponential Moving Averages (EMAs). After the price reaches a configurable percentage below the lowest EMA, Gunbot begins to monitor for a trend reversal. Trend calculations are performed automatically by the XTrend indicator, and its activity is visible in your logs. XTrend's output can vary based on your PERIOD setting. Using XTrend for trend confirmation is optional; StepGain can also trigger trades based purely on price reversals relative to the configured EMA levels.

For additional confirmation before executing trades, you can incorporate secondary indicators like RSI or Stochastic. This setup allows trades only when both a trend reversal and specific indicator conditions (e.g., RSI level) are met, potentially reducing risk and improving the reliability of trading decisions.

How It Works​

Buy Conditions:​

A buy order is triggered if the price is within the configured buy levels (relative to EMA) and a bullish trend reversal is detected (if XTrend is used) or the price moves up from a low.

Sell Conditions:​

A sell order is triggered if the price is within the configured sell levels (relative to EMA or break-even) and a bearish trend reversal is detected (if XTrend is used) or the price moves down from a high. Additionally, the defined profit (GAIN) target must be met.

Trading Example​

StepGain strategy example showing trend-based trading performance

Example of potential StepGain strategy performance. [_Details and settings](https://www.tradingview.com/chart/XLMBTC/SxHYdOCD-Stepgain-Gunbot-trading-strategy/)_

The infographic below describes what triggers trades with this strategy.

StepGain strategy diagram illustrating buy and sell trigger conditions

In this diagram, BUYLVL and SELLLVL are hypothetically set to 2. A change in price movement direction is simplified as a trend reversal for this illustration. In practice, not every price direction change qualifies as a trend reversal, as trend strength is also considered by XTrend.

StepGain Settings​

Buy Settings​

LabelConfig ParameterDefault ValueDetailed Description
Buy enabledBUY_ENABLEDtrueIf enabled, allows the StepGain strategy to place buy (long) orders.
Stepgain buy lvlBUYLVL1Selects which of the defined 'buy levels' (BUYLVL1, BUYLVL2, BUYLVL3) will be active for placing buy orders. Choose 1, 2, or 3.
Stepgain buy lvl 1BUYLVL10.3Defines the first level as a percentage below the lowest EMA. If BUYLVL is 1, Gunbot looks for buy signals around this price level.
Stepgain buy lvl 2BUYLVL21Defines the second level as a percentage below the lowest EMA. If BUYLVL is 2, Gunbot looks for buy signals around this price level.
Stepgain buy lvl 3BUYLVL32Defines the third level as a percentage below the lowest EMA. If BUYLVL is 3, Gunbot looks for buy signals around this price level.

Sell Settings​

LabelConfig ParameterDefault ValueDetailed Description
Sell enabledSELL_ENABLEDtrueIf enabled, allows the StepGain strategy to place sell (short) orders.
Stepgain sell lvlSELLLVL1Selects which of the defined 'sell levels' (SELLLVL1, SELLLVL2, SELLLVL3) will be active for placing sell orders. Choose 1, 2, or 3.
Stepgain sell lvl 1SELLLVL10.3Defines the first sell level as a percentage above the break-even price. If SELLLVL is 1, Gunbot looks for sell signals around this price level, provided GAIN is also met.
Stepgain sell lvl 2SELLLVL21Defines the second sell level as a percentage above the break-even price. If SELLLVL is 2, Gunbot looks for sell signals around this price level, provided GAIN is also met.
Stepgain sell lvl 3SELLLVL32Defines the third sell level as a percentage above the break-even price. If SELLLVL is 3, Gunbot looks for sell signals around this price level, provided GAIN is also met.
Count sellCOUNT_SELL9999Disables trading for the pair after a specified number of sell orders have been executed. Range: 1 to 999999. Allows for strategic exits after a certain number of trades.

Indicators​

LabelConfig ParameterDefault ValueDetailed Description
PeriodPERIOD15Defines the candlestick period (e.g., 5 minutes, 15 minutes) used for calculating indicators like EMA and XTrend. Ensure the chosen value (in minutes) is supported by your exchange.
Medium EMAEMA116Specifies the number of candlesticks (periods) used to calculate the medium-term Exponential Moving Average (EMA1).
Fast EMAEMA28Specifies the number of candlesticks (periods) used to calculate the short-term (fast) Exponential Moving Average (EMA2).

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