Stepgain

Stepgain follows the markets prices and trend, and buys or sells as soon as the trend reverses. Assuming a trend reversal (from downtrend to uptrend) usually takes place close to the bottom of a price movement, this allows you to buy shortly after a price bottomed. Similarly, selling takes place when an uptrend turns into a downtrend.

Buying with Stepgain is based on EMA, enabling Gunbot to start looking for a trend reversal after a set percentage below the lowest EMA is reached.

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.

You can optionally use indicators like RSI or Stochastic as confirmation to only buy or sell when both a trend reversal and a specific indicator level occur.

Trading example

stepgain

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

How to work with this strategy

The infographic below describes what triggers trades with this strategy.

stepgain

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 strenght of the trend is considered as well.

Stepgain tuner (thanks @allanster!)

Strategy parameters

Following settings options are available for stepgain and can be set in the strategy configurator of the GUI or the strategies section of the config.js file.

These settings are global and apply to all pairs running this strategy. When you want a specific parameter to be different for one or more pairs, use an override at the pair level.

Using the BUY_METHOD and SELL_METHOD parameters you can combine different methods for buying and selling. This strategy page assumes both BUY_METHOD and SELL_METHOD are set to stepgain. Accepted values are all strategy names as listed here.

Buy settings

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

ParameterDefault valueDescription
BUYLVL1Values: 1 / 2 / 3 – represents steps.
This sets which step should be considered for buying:1: Buy when price drops below BUYLVL1 and the trend reverses or price hits BUYLVL2.2: Buy when price drops below BUYLVL2 and the trend reverses or price hits BUYLVL3.3: Buy when price drops below BUYLVL3 and the trend reverses.
BUYLVL10.6Values: numerical – represents a percentage.
Defines the first level below the lowest EMA to be considered for buying. Only used when BUYLVL is set to 1.When set to 1, this means that the price needs to be at least 1 percent below the lowest EMA.
BUYLVL22Values: numerical – represents a percentage.
Defines the second level below the lowest EMA to be considered for buying. Used when BUYLVL is set to 1 or 2.When set to 2, this means that the price needs to be at least 2 percent below the lowest EMA.
BUYLVL370Values: numerical – represents a percentage.
Defines the third level below the lowest EMA to be considered for buying. Used when BUYLVL is set to 2 or 3.When set to 10, this means that the price needs to be at least 10 percent below the lowest EMA.
BUY_ENABLEDtrueValues: true or false.
Set this to false to prevent Gunbot from placing buy orders. Affects all types of buy orders.
NBA0Values: numerical, represents a percentage
“Never Buy Above”. Use this to only allow buy orders below the last sell rate. This sets minimum percentage difference between the last sell order and the next buy. The default setting of 0 disables this option.When set to 1, Gunbot will only place a buy order when the strategy buy criteria meet and price is at least 1% below the last sell price.
TAKE_BUYfalseValues: true or false.
With this setting enabled, Gunbot will try to take any buy chance between the strategy entry point and your setting for TBUY_RANGE.As soon as the ask price drops below the upper border of this range (called “Take Buy”), it will trail down with a range of TBUY_RANGE and place a buy order as soon as the ask price crosses up “Take Buy”. Confirming indicators in use are respected.Normal strategy buy orders are still possible while using TAKE_BUY.This option should not be used together with reversal trading.
TBUY_RANGE0.5Values: numerical – represents a percentage.
This sets the buy range for TAKE_BUY.When set to 0.5, the initial trailing stop is set 0.5% above the entry point defined by BUY_LVL.

Sell settings

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

ParameterDefault valueDescription
SELLLVL1Values: 1 / 2 / 3 – represents steps.
This sets which step should be considered for selling:1: Sell when price rises above SELLLVL1 and the trend reverses or price hits SELLLVL2.2: Sell when price rises above SELLLVL2 and the trend reverses or price hits SELLLVL3.3: Sell when price rises above SELLLVL3 and the trend reverses.
SELLLVL10.6Values: numerical – represents a percentage.
Defines the first level above the break-even point to be considered for selling. Only used when SELLLVL is set to 1.When set to 1, this means that the price needs to be at least 1 percent above the average bought price.
SELLLVL22Values: numerical – represents a percentage.
Defines the second level above the break-even point to be considered for selling. Used when SELLLVL is set to 1 or 2.When set to 2, this means that the price needs to be at least 2 percent above the average bought price.
SELLLVL370Values: numerical – represents a percentage.
Defines the third level above the break-even point to be considered for selling. Used when SELLLVL is set to 2 or 3.When set to 10, this means that the price needs to be at least 10 percent above the average bought price.
SELL_ENABLEDtrueValues: true or false.
Set this to false to prevent Gunbot from placing sell orders. Affects all types of sell orders.
TAKE_PROFITfalseValues: true or false.
With this setting enabled, Gunbot will try to take any possible profit between the break-even point and your strategy exit point. This can be useful, for example, on days where the markets move very slowly.It works by trailing prices upwards between the break-even point and the strategy exit point, with a configurable range for trailing: TP_RANGE. A sell order will be placed when the trailing stop limit is hit or strategy sell conditions are reached. Confirming indicators in use are respected.Sells at minimal loss are possible when using TAKE_PROFIT, acting as a sort of mini stop loss.This option should not be used together with reversal trading and DOUBLE_CHECK_GAIN
TP_RANGE0.5Values: numerical – represents a percentage.
This sets the sell range for TAKE_PROFIT.When set to 0.5, the initial trailing stop is set 0.5% below the break-even point.
TP_PROFIT_ONLYfalseValues: true or false.
Enable this to only allow sell orders above the break-even point.
DOUBLE_CHECK_GAINtrueValues: true or false.
This is an extra check that looks at your recent trading history to verify SELLLVL will be reached before placing a sell order.

Balance settings

Go to balance settings

Indicator settings

Relevant indicators for buying with stepgain

These settings have a direct effect on buying with stepgain, because BUY_LEVEL is dependant on EMA.

ParameterDefault valueDescription
PERIOD15Values: numerical– represents candlestick size in minutes.
This sets the candlestick period used for trading, this affects all indicators within the strategy and the BUY_LEVEL. Only use supported values.Setting a short period allows you to trade on shorter trends, but be aware that these will be noisier than longer periods.
EMA116Values: numerical – represents a number of candlesticks.
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).
EMA28Values: numerical – represents a number of candlesticks.
Set this to the amount of candlesticks you want to use for your fast 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 fast EMA – you need to set EMA2 to 12 (12 * 5 mins).
XTREND_ENABLEDfalseValues: true or false.
Disable this to use stepgain the legacy way: act on price reversals only – not considering XTrend.When disabled, stepgain will trade when a price reversal above/below the set level happens. When enabled, stepgain will trade when a price reversal above/below the set level happens and the direction of the trend is confirmed by XTrend.

Confirming indicators + advanced indicator settings

Go to confirming indicators

Dollar cost avg settings

Go to Dollar cost avg (DCA)

Reversal trading settings

Go to reversal trading

TrailMe settings

Parameters to configure additional trailing for various types of orders. Trailing works just like it does for the TSSL strategy, the difference being the starting point of trailing.

Orders resulting from trailing are only placed when the main strategy criteria are met, and confirming indicators (if any) allow the order. All these conditions must occur in the same cycle.

Because stepgain trades when trends reverse, it is not recommended to use additional trailing for normal buy or sell orders.

Go to Trailme

Misc settings

Go to misc settings

Placeholders

The following parameters in config.js have no function for this strategy and act as placeholder.

ParameterDescription
ATRXPlaceholder.
ATR_PERIODPlaceholder.
BUY_LEVELPlaceholder.
BUY_RANGEPlaceholder.
DISPLACEMENTPlaceholder.
FAST_SMAPlaceholder.
GAINPlaceholder.
HIGH_BBPlaceholder.
KIJUN_CLOSEPlaceholder.
KIJUN_PERIODPlaceholder.
KIJUN_STOPPlaceholder.
KUMO_CLOSEPlaceholder.
KUMO_SENTIMENTSPlaceholder.
KUMO_STOPPlaceholder.
LEVERAGEPlaceholder.
LONG_LEVELPlaceholder.
LOW_BBPlaceholder.
MACD_LONGPlaceholder.
MACD_SHORTPlaceholder.
MACD_SIGNALPlaceholder.
MAKER_FEESPlaceholder.
MEAN_REVERSIONPlaceholder.
PP_BUYPlaceholder.
PP_SELLPlaceholder.
PRE_ORDER_GAPPlaceholder.
PRE_ORDERPlaceholder.
RENKO_ATRPlaceholder.
RENKO_BRICK_SIZEPlaceholder.
RENKO_PERIODPlaceholder.
ROE_CLOSEPlaceholder.
ROE_LIMITPlaceholder.
ROE_TRAILINGPlaceholder.
ROEPlaceholder.
RT_BUY_LEVELPlaceholder.
SELL_RANGEPlaceholder.
SENKOUSPAN_PERIODPlaceholder.
SHORT_LEVELPlaceholder.
SLOW_SMAPlaceholder.
TENKAN_CLOSEPlaceholder.
TENKAN_PERIODPlaceholder.
TENKAN_STOPPlaceholder.
TSSL_TARGET_ONLYPlaceholder.
USE_RENKOPlaceholder.