Skip to main content

Stepgridhybrid

This strategy borrows the grid logic from the stepgrid strategy and combines it with a trend monitor that constantly evaluates the market on 15m, 1h and 4h timeframes.

Besides offering a lot of options for customizations, stepgridhybrid has:

  • 'trading modes' that control when to start and stop trading a pair
  • the ability to keep track of how much unsold buy volume remains below the current price
  • the ability to automatically skip grid steps, for example when price is dropping out of a recently traded range
  • the ability to place additional orders based on trend triggers, next to grid orders
  • the ability to be combined with manual trades on the same pair

Trading behavior​

In it's pure form, stepGridHybrid is basically like stepGrid with one difference: sell amounts are based on remaining buy volume below the current price. This means that it is possible to skip buy steps (either intentionally or by accident), as soon as trading resumes at a lower level it will not attempt to sell units bought at higher rates unless the overall break even price is reached.

The integrated trend module offers settings to influence trading behavior like:

  • when it's allowed to open a new trade
  • place additional buy orders during a pump
  • skip buy steps when price action is negative
  • increase sell target and sell trailing range when price action is positive

When you run stepgridhybrid, this is the kind of trading behavior to expect:

Stepgridhybrid trading behavior

Let's break down what actually happens:

  • Most trades follow the exact same logic as the stepgrid strategy
  • Sell amounts are not static, each sell order sells the remaining volume bought at lower prices * 'partial sell ratio'
  • When price was moving downwards rapidly, several buy steps were skipped with the goal to spend the funds later
  • When in no position, the trading bot will buy again when either the next buy or sell step is reached - as long as the current trading mode allows opening new trades at that time

Skipping steps​

Example of skipping buy steps

The marked zones in the screenshot above are intentionally skipped buy steps. There are different triggers for skipping steps, some of them are settings configurable, some are hardcoded.

Non grid orders​

Example of non grid orders

The marked zones in the screenshot above are examples of additional buy orders that were triggered by conditions detected in the trend module. Such orders do not move the then active grid targets.

Trading modes​

Settings for trading modes mainly define when to start and stop grid trading. By default the strategy runs in an unrestricted mode, allowing it to open a new trade anytime.

By using one of the available trading modes, opening new trades is restricted by the entry and exit criteria of the selected mode. Meaning that as soon as all assets have been sold, a new trade can only be opened when the mode allows for it.

Modes are meant to be used one at a time, enabling multiple modes on a single pair can lead to unexpected behavior.

info

Trading modes can be extremely restrictive. Sometimes there can be several weeks or more between two 'entry signals' detected on the same pair.

Manual trading range mode​

Manually set a price range in which new trades are allowed. Optionally a stop limit price can be used.

TA mode​

Starts trading when the entry conditions for one of a collection of TA fractals is detected, disallows opening new trades when one or more exit scenarios have been detected. Think of 'fractals' as an attempt to detect a variety of bullish reversal patterns.

This mode includes an optional stop loss trigger.

Volatility mode​

Attempts to look for pairs that are currently in an uptrend on the 4h timeframe, and in the lower area of a volatility zone. Allows trading from near to the bottom to the top of an expected volatility range.

This mode includes a stop in profit mechanism that automatically gets activated near the top of the zone, as well as an optional stop loss trigger.

Pullback mode​

When one of several pullback scenarios is detected on the 4h timeframe, new trades are allowed until 15 minutes after the scenario loses validity.

This mode automatically increases the invested amount for the first few trades.

StepGridHybrid settings​

Balance settings​

LabelConfig ParameterDefault ValueDetailed Description
Trading limitTRADING_LIMIT80The base amount you invest for each individual buy order is 80 USDT. Due to multipliers, the actual investment per order can range from 20 to 160 USDT.
Trading limit multiplierTL_MULTIPLIER1Adjusts the invested amount for each buy order. For example, with a trading limit of 100 USDT:

- A multiplier of 1.0 maintains 100 USDT per order.
- A multiplier of 1.5 results in sequential orders of 100, 150, and 225 USDT.
- A multiplier of 2 results in sequential orders of 100, 200, and 400 USDT.
Auto TL ratioUSE_TLRfalseEnables dynamic adjustment of the buy amount based on price. The buy amount varies between 0.25 to 1 times the trading limit, depending on whether the price is high or low.
Auto Partial sell ratioUSE_PSRfalseAutomatically adjusts the partial sell ratio based on price. When prices are low, a higher ratio is used, leading to selling nearly the entire amount of the previous buy order. Conversely, a lower ratio is used when prices are high, resulting in smaller partial sell orders aimed at capturing better sell prices.
Partial sell ratioPARTIAL_SELL_RATIO0.95Defines the percentage of previously bought volume that can be sold at each sell step. For example, if 200 units were bought at lower prices, a partial sell ratio of 0.4 would allow selling 80 units at the current price.
Use partial sell capPARTIAL_SELL_CAPfalseLimits the maximum quantity of a partial sell order to prevent selling more than intended.
Partial sell cap ratioPARTIAL_SELL_CAP_RATIO1Sets the maximum value of a partial sell order to not exceed the trading limit value. A setting of 1 means the maximum partial sell order equals the trading limit.
Max buy countMAX_BUY_COUNT40Limits the total position size to a maximum of 40 times the trading limit. When this maximum is reached, the strategy will only place sell orders.
Min volume to sellMIN_VOLUME_TO_SELL10The minimum order value that the strategy considers sellable. Please verify this value with your exchange to ensure it meets the minimum trade requirements.
Max invested baseMAX_INVESTMENT999999999999999Limits the total investment in base currency, which in the case of USDT-BTC would be the USDT amount. For example, setting this to 1000 limits the maximum investment to 1000 USDT.
tip

Dynamic invest per order

In this strategy, the invest per buy order is not static.

The user setting for trading limit is the base amount for several multipliers in the strategy, deviations between 0.3x and 2x trading limit are possible.

Customize grid​

LabelConfig ParameterDefault ValueDetailed Description
PeriodPERIOD15Selects the candle period used for auto-calculating step size and trailing range. A lower period value increases trading frequency and associated risks. This strategy also considers longer periods like 1h and 4h for trend analysis.
Auto step sizeAUTO_STEP_SIZEtrueAllows the strategy to automatically determine a grid step size that matches the current volatility of the trading pair.
Minimum step pctMIN_STEP_PCT0Sets a minimum percentage for the grid step size to ensure it does not fall below a certain threshold, which can override the auto step size if it is set lower than this minimum percentage.
Step sizeSTEP_SIZE500Manually sets the grid step size for buy and sell orders when auto step size is not used. This setting can represent an absolute value in fiat (e.g., 500 USDT in USDT-BTC) or a percentage when pct step size is enabled.
Pct step sizePCT_STEP_SIZEfalseWhen enabled, the step size is treated as a percentage of the current price, modifying how the grid steps are calculated.
Enforce step sizeENFORCE_STEPfalseEnsures that the specified step size is strictly adhered to, which can prevent orders from executing if the price does not align precisely with the grid steps, aiding in more precise capital management.
Unit costunit_costtrueDetermines how the break-even price is calculated. When enabled, the break-even price reflects the average cost per unit of the remaining balance. When disabled, it reflects the price at which all remaining units can be sold without loss.
Dynamic exit logicDYNAMIC_EXIT_LOGICfalseModifies the exit strategy based on market conditions. In an uptrend, the exit target is the unit cost; in other situations, it is the overall break-even price. This setting is dependent on the 'unit cost' setting being disabled.
Partial sell gainGAIN_PARTIAL0.5Sets the minimum profit target for partial sells. A setting of 0.5% means partial sell orders are placed only when the buy price is at least 0.5% lower than the current price, after accounting for trading fees.
GainGAIN1Defines the minimum profit percentage above the current break-even or unit cost that must be achieved before a full sell order is executed. For instance, a setting of 1% ensures that full sells only occur at prices 1% higher than the break-even or unit cost.

Customize trailing​

LabelConfig ParameterDefault ValueDetailed Description
Pct buy trailing rangePCT_TRAILING_RANGEfalseEnables setting a custom percentage to define the buy trailing range, which overrides the default automatic setting based on support and resistance distances.
Custom buy trailing rangeCUSTOM_TRAILING_RANGE0.3Defines the specific percentage used for the buy trailing range when 'Pct buy trailing range' is enabled. A setting of 0.5% means the trailing range will be 0.5% of the current price.
Pct sell trailing rangePCT_SELL_TRAILING_RANGEfalseAllows you to set a custom percentage for the sell trailing range, which overrides the default automatic setting based on current market conditions.
Custom sell trailing rangeCUSTOM_SELL_TRAILING_RANGE0.3Specifies the percentage used for the sell trailing range when 'Pct sell trailing range' is enabled. A setting of 0.5% sets the trailing range to 0.5% of the current price, affecting how sell orders are trailed.

Trend options​

LabelConfig ParameterDefault ValueDetailed Description
Trend syncTREND_SYNCfalseRestricts the initiation of new trades to periods when the 4h and 1h trends are aligned, enhancing consistency but potentially reducing trade frequency. This setting does not affect dollar-cost averaging (DCA) trades.
Trend basicTREND_BASICtrueEnables dynamic trading actions based on market conditions, such as increased sell steps and trailing ranges during favorable markets, immediate buy orders during strong uptrends, and higher partial sell ratios following such buys.
Trend plusTREND_PLUStrueFurther enhances dynamic trading by enabling immediate buy orders during perceived short-term opportunities and increasing partial sell ratios following these buys, aiming to capitalize on market momentum.
Trend ordersTREND_ORDERStrueControls whether orders initiated by 'Trend basic' and 'Trend plus' settings are allowed, providing a method to toggle these dynamic features on and off without disabling the settings entirely.
Auto trend ordersAUTO_TREND_ORDERStrueLimits the execution of trend-initiated orders to periods during a 4h uptrend, refining the strategy's market engagement to potentially more profitable times.
Trailing range multiplierTRAILING_MULTIPLIER2Applies a multiplier to the trailing range when conditions detected by 'Trend basic' or 'Trend plus' warrant a larger trailing range, such as in specific bullish conditions. This setting also affects custom pct trailing ranges.
Sell step multiplierSELL_STEP_MULTIPLIER1.2Increases the size of sell steps by a factor of 1.2 in certain market conditions identified by the trend modules, enhancing profit potential during specific trends.
Trend trailingTREND_TRAILINGtrueAutomatically adjusts buy trailing ranges in bearish market conditions to avoid premature or unprofitable buying, enhancing strategy efficiency during downtrends.
Trend trailing multiplier (small)TREND_TRAILING_MULTIPLIER1Applies a smaller multiplier to buy trailing ranges when the 4h trend is bullish but the 15m trend is bearish, allowing for adjusted buy points that reflect short-term market dips within a generally positive trend.
Trend trailing multiplier (big)TREND_TRAILING_BEARISH_MULTIPLIER2Applies a larger multiplier to buy trailing ranges when both the 4h and 15m trends are bearish, significantly widening the buy range to capture better entry points during pronounced downtrends.

Trading modes​

LabelConfig ParameterDefault ValueDetailed Description
Custom trading rangeCUSTOM_TRADING_RANGE_MODEfalseEnables the definition of a specific price range within which the strategy operates. New trades are only opened within a price band of 8000 to 10000 USDT. DCA trades can occur at any price, but if the price falls below 7000 USDT, all holdings are sold.
Trading range lowTRADING_RANGE_LOW8000Sets the lower limit of the custom trading range, below which new trades are not initiated.
Trading range highTRADING_RANGE_HIGH10000Sets the upper limit of the custom trading range, above which new trades are not initiated.
Trading range stopTRADING_RANGE_STOP7000Defines a stop loss target within the custom trading range. If the opening rate of the latest candle falls below this level, all holdings are sold to limit losses.
Trading range DCA stopTRADING_RANGE_DCA_STOP7500Sets the lower limit for placing DCA orders within the custom trading range, ensuring that no additional DCA orders are placed below this price level.
Pullback modePULLBACK_MODEfalseRestricts new trades to times when a price pullback occurs, as primarily observed on 4h charts. This setting aims to optimize entry points but can significantly limit trading opportunities.
Volatility modeVOLATILITY_MODEfalseLimits trading to bullish pairs within a controlled volatility range. It aims to start trades at lower prices and stop at peaks, with a built-in stop mechanism to potentially minimize losses on the final sell order.
TA modeTA_MODEfalseRestricts trading to bullish pairs that meet specific technical analysis fractals, aiming to optimize trade entries based on technical signals.
Dynamic stop lossDYNAMIC_SLfalseProvides a dynamic stop loss target when used with volatility or TA mode, offering a safety mechanism that is not visible until it triggers, which can lead to potential losses.

Advanced​

LabelConfig ParameterDefault ValueDetailed Description
Stop after next sellSTOP_AFTER_SELLfalseHalts new trading activities after the current holdings are fully sold, ensuring that no new buy orders are placed when there is no balance left to sell.
Forever bagsFOREVER_BAGSfalseEnables a strategy of holding onto trades indefinitely, ignoring the break-even price and focusing on potential long-term gains from significant market upswings.
Buy enabledBUY_ENABLEDtrueAllows the placement of buy orders within the strategy, facilitating continuous trading activity and potentially increasing profitability.
Sell enabledSELL_ENABLEDtrueEnables the placement of sell orders, ensuring the strategy can take profits and manage positions effectively.
SMA periodSMAPERIOD50Defines the number of candles used to calculate support and resistance levels for trailing range calculations. The default setting of 50 is typically adequate without adjustments.
ATR periodATR_PERIOD50Specifies the number of candles used to determine the Average True Range, which helps calculate the auto step size for the strategy. The default setting of 50 generally does not require modification.
Keep quoteKEEP_QUOTE0Sets a minimum amount of the quote currency to retain, preventing the strategy from selling this portion of the balance. For example, setting it to 0.01 in USDT-BTC means the strategy will not sell the last 0.01 BTC.
Ignore trades beforeIGNORE_TRADES_BEFORE0Allows the strategy to disregard any trades that occurred before the specified Unix timestamp. Useful for resetting the strategy's trading calculations and history.
tip

Other parameters

Besides settings mentioned on this page, no other strategy setting has any effect on stepgridhybrid.