Skip to main content

Reversal trading (RT)

Reversal trading (RT) is a Gunbot technique to keep on trading profitably when prices move downwards after an asset has been purchased.

The principle is to use the already invested amount of base currency to accumulate more units of the quote currency after prices have moved downwards. When prices keep going down, or go sideways at a lower level than the initial purchase, RT can keep accumulating until prices move up enough to sell the accumulated amount for an overall profit.

Trading fees paid while in reversal trading are all accounted for.

Note that this example is kept simple intentionally. Prices don't have to go straight down for RT to successfully accumulate.

danger

Using reversal trading can be challenging to set up and comprehend. It's advisable only to employ it if you have a definite plan and are prepared to dedicate a considerable amount of time to learn about it and assess your outcomes.

How it works​

Reversal trading starts when the current price is a set percentage lower than the last bought price, this is defined with RT_GAIN. The initial bag gets sold for base currency (RT_SELL) and the invested amount is reserved for buying back more units when prices drop further. When the price then drops by a percentage defined with RT_BUY_LEVEL, quote currency gets bought (RT_BUY). You now own more quote currency than you initially bought, at a lower price per unit.

This process will repeat when prices keep dropping, enabling you to keep accumulating quote currency without investing additional assets. Required funds are locked for the pair in reversal trading, and can't be used by other pairs.

With TM_RT_SELL, or when using bb as selling strategy, it's possible to place an RT_SELL at a higher rate than the previous RT_BUY, enabling you to reach a profitable exit point much faster.

When prices reach an overall profitable price (EXIT POINT), a normal sell order is placed using the sell criteria of your strategy.

In case prices recover to the break even point before an RT_BUY could be made, the initial bag will be bought back to continue normal trading (RT_BUYBACK). Alternatively, you can set a custom level for buying back quote with RT_BUY_UP_LEVEL.

Tips before using​

  • Do not activate reversal trading on existing bags that are already down a lot unless you useTM_RT_SELL! The decision to run reversal trading or not should best be made before you start trading a pair, this way the process can kick in timely.
  • Reversal trading math is done based on your trading history, if your last sell order was at loss (and not caused by stop limit), reversal trading would immediately start when you enable it and continues until it manages to profitably end the RT cycle - even when you've disabled RT again.
  • To prevent unwanted reversal trading, make sure to either have a profitable last sell order or to have set IGNORE_TRADES_BEFORE at a time after your last sell order at loss. You can use https://currentmillis.com/ to generate the needed timestamp. To be sure, delete the pairs state JSON file after setting IGNORE_TRADES_BEFORE.
  • You can set a maximum price difference between current price and average bought price with RT_MAXBAG_PROTECTION, to prevent RT from starting on pairs that already lost a lot of value.

RT flowcharts​

There are three different ways Gunbot handles reversal trading, based on main strategies used for a pair. The chosen buy strategy affects the way RT_BUY orders are executed, the sell strategy affects RT_SELL orders.

Optional steps in the flowcharts are only relevant when TM_RT_SELL and/or RT_TREND_ENABLED are enabled.

1. Simplified flow for RT​

This flowchart shows the basic steps for reversal trading, not considering additional options like trailing or strategy specific conditions.

2. RT process for all strategies except bb​

3. RT process for bb​

LOW_BB/HIGH_BB in reversal trading use the same settings as with regular trading on bb.

RT settings​

LabelConfig ParameterDefault ValueDetailed Description
RT enabledRT_ENABLEDfalseEnables Reversal Trading (RT). When active, this feature allows trading strategies to capitalize on market reversals. Be cautious: disabling RT during an active RT process may require manual adjustments to trade tracking.
RT buy levelRT_BUY_LEVEL2Defines the percentage drop required from the last sell price to trigger a buy in RT. This setting helps in re-entering the market at a lower price point, potentially increasing profitability.
RT gainRT_GAIN1.5Sets the percentage gain target from the initial buy or last RT buy to initiate an RT sell. This is crucial to ensure that the sell occurs at a profit above the market spread.
RT buy up levelRT_BUY_UP_LEVEL0Configures a reverse stop loss, determining a percentage above the last RT sell to place an RT buy. Setting this to 0 disables the feature, which can be used to buy back at a higher price after a sell if anticipated further price increases.
RT onceRT_ONCEfalseWhen set to true, disables the pair after successfully completing an RT cycle at a profit, stopping further trades.
RT once and continueRT_ONCE_AND_CONTINUEfalseThis setting allows trading to continue without RT after successfully ending an RT cycle at profit, effectively resetting the strategy while maintaining active trading on the pair.
RT max bag protectionRT_MAXBAG_PROTECTION10Limits the maximum allowable loss percentage from the break-even point before starting RT. This protection helps manage risk by preventing entries into trades that are too far from profitability.
RT trend enabledRT_TREND_ENABLEDfalseEnables the use of trend analysis to determine optimal times for placing RT buy or sell orders, incorporating price forecasts and trend data.

Overview of effects on different order types​

Config ParameterAffected Order TypesNot Affected Order Types
RT EnabledRT buy, RT buyback, RT sellStrategy buy, Strategy sell, Close, DCA buy, Stop limit
RT GainRT sellStrategy buy, Strategy sell, Close, DCA buy, Stop limit, RT buyback, RT buy
RT Buy LevelRT buyStrategy buy, Strategy sell, Close, DCA buy, Stop limit, RT buyback, RT sell
RT Sell UpRT sellStrategy buy, Strategy sell, Close, DCA buy, Stop limit, RT buyback, RT buy
RT Buy Up LevelRT buybackStrategy buy, Strategy sell, Close, DCA buy, Stop limit, RT sell, RT buy
RT Trend EnabledRT buy, RT sellStrategy buy, Strategy sell, Close, DCA buy, Stop limit, RT buyback
RT OnceRT cycle (until final strategy sell)Strategy buy, Strategy sell, Close, DCA buy, Stop limit, RT buyback, RT buy, RT sell
RT Once And ContinueRT cycle (until final strategy sell)Strategy buy, Strategy sell, Close, DCA buy, Stop limit, RT buyback, RT buy, RT sell
RT Maxbag ProtectionStart of RTStrategy buy, Strategy sell, Close, DCA buy, Stop limit, RT buyback, RT buy, RT sell
Trail Me RTRT buyStrategy buy, Strategy sell, Close, DCA buy, Stop limit, RT buyback, RT sell
Trail Me RT SellRT sellStrategy buy, Strategy sell, Close, DCA buy, Stop limit, RT buyback, RT buy
Trail Me Buy RangeStrategy buy, RT Buy, DCA buyStrategy sell, RT sell, Close, Stop limit, RT buyback
Trail Me RT Sell RangeRT sellStrategy buy, Strategy sell, Close, DCA buy, Stop limit, RT buyback, RT buy