< All Topics
Print

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, AILidex uses EMA (Exponential Moving Average). After a set percentage below the lowest EMA is reached, AILidex 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.

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

The infographic below describes what triggers trades with this strategy.

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.

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.

Buy enabled
Description
Values
Order types
Name
Set this to false to prevent AILidex from placing buy orders.

Stepgain Buy Lvl
Description
Values
Order types
Name
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.

Stepgain Buy Lvl 1
Description
Values
Order types
Name
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.

Stepgain Buy Lvl 2
Description
Values
Order types
Name
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.

Stepgain Buy Lvl 3
Description
Values
Order types
Name
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.

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.

Sell enabled
Description
Values
Order types
Name
Set this to false to prevent AILidex from placing sell orders.

Stepgain Sell Lvl
Description
Values
Order types
Name
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.

Stepgain Sell Lvl 1
Description
Values
Order types
Name
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.

Stepgain Sell Lvl 2
Description
Values
Order types
Name
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.

Stepgain Sell Lvl 3
Description
Values
Order types
Name
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.

Indicator settings
Relevant indicators for trading with gain.

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

Period
Description
Values
Order types
Name
This sets the candlestick period used for trading, this affects all indicators within the strategy.

Only use supported values. The trading settings editor suggests valid values for the selected exchange..

Setting a short period allows you to trade on shorter trends, but be aware that these will be noisier than longer periods.

Slow EMA
Description
Values
Order types
Name
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).

Medium EMA
Description
Values
Order types
Name
Set this to the amount of candlesticks you want to use for your medium 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 medium EMA – you need to set EMA2 to 12 (12 * 5 mins).

XTrend Enabled
Description
Values
Order types
Name
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.

Table of Contents