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.
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​
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.
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​
Label | Config Parameter | Default Value | Detailed Description |
---|---|---|---|
Buy enabled | BUY_ENABLED | true | If enabled, allows the StepGain strategy to place buy (long) orders. |
Stepgain buy lvl | BUYLVL | 1 | Selects which of the defined 'buy levels' (BUYLVL1 , BUYLVL2 , BUYLVL3 ) will be active for placing buy orders. Choose 1, 2, or 3. |
Stepgain buy lvl 1 | BUYLVL1 | 0.3 | Defines 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 2 | BUYLVL2 | 1 | Defines 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 3 | BUYLVL3 | 2 | Defines 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​
Label | Config Parameter | Default Value | Detailed Description |
---|---|---|---|
Sell enabled | SELL_ENABLED | true | If enabled, allows the StepGain strategy to place sell (short) orders. |
Stepgain sell lvl | SELLLVL | 1 | Selects which of the defined 'sell levels' (SELLLVL1 , SELLLVL2 , SELLLVL3 ) will be active for placing sell orders. Choose 1, 2, or 3. |
Stepgain sell lvl 1 | SELLLVL1 | 0.3 | Defines 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 2 | SELLLVL2 | 1 | Defines 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 3 | SELLLVL3 | 2 | Defines 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 sell | COUNT_SELL | 9999 | Disables 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​
Label | Config Parameter | Default Value | Detailed Description |
---|---|---|---|
Period | PERIOD | 15 | Defines 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 EMA | EMA1 | 16 | Specifies the number of candlesticks (periods) used to calculate the medium-term Exponential Moving Average (EMA1). |
Fast EMA | EMA2 | 8 | Specifies the number of candlesticks (periods) used to calculate the short-term (fast) Exponential Moving Average (EMA2). |
Overview of Effects on Different Order Types​
Config Parameter | Affected Order Types | Not Affected Order Types |
---|---|---|
Buy Enabled | Strategy buy, DCA buy, RT buy, RT buyback | Strategy sell, Stop limit, Close, RT sell |
Stepgain Buy Lvl | Strategy buy | Strategy sell, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback |
Stepgain Buy Lvl 1 | Strategy buy | Strategy sell, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback |
Stepgain Buy Lvl 2 | Strategy buy | Strategy sell, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback |
Stepgain Buy Lvl 3 | Strategy buy | Strategy sell, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback |
Sell Enabled | Strategy sell, Stop limit, RT sell | Strategy buy, RT buy, RT buyback, Close, DCA buy |
Stepgain Sell Lvl | Strategy sell | Strategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit |
Stepgain Sell Lvl 1 | Strategy sell | Strategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit |
Stepgain Sell Lvl 2 | Strategy sell | Strategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit |
Stepgain Sell Lvl 3 | Strategy sell | Strategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit |
Period | Strategy sell, Strategy buy, DCA buy (trigger) | RT buy, RT buyback, RT sell, Close, Stop limit |
Slow EMA | Strategy buy | RT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy |
Medium EMA | Strategy buy | RT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy |
XTrend Enabled | Strategy buy | RT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy |