Skip to main content

supportresistance (method)

The method simply involves buying at the support level and selling at the resistance level. To customize this approach, you can set a designated range from the support and resistance levels for trading.

To better understand this strategy, it is important to comprehend the concept of support and resistance levels in trading. A support level refers to a price point where there is an anticipated increase in demand, causing the asset's price to halt its decline or bounce back up. Resistance level, on the other hand, is a price point where there is expected to be a significant surge in supply, leading to the asset's price decreasing or facing a pullback.

In technical analysis, traders use support and resistance levels to predict potential price movements of an asset. By identifying these key levels, traders can make informed decisions about when to enter or exit trades. This method involves monitoring an asset's price movements and buying when it reaches the support level and selling when it reaches the resistance level.

How to work with it

Buy method conditions

A buy order is placed when price is within SupRes_SPREAD % from support.


This strategy can buy multiple times, it can be capped with SupRes_MAX.

Sell method conditions

A sell order is placed when price is within SupRes_SPREAD % from resistance, and additionally the set gain % is reached.


Gain protection is optional for this strategy. Be aware that this can lead to sell orders below your break-even point.

How to work with this strategy

There is just a single setting that defines the entry point for this strategy: SupRes_SPREAD

This setting represents a percentage (of price) above the first support level (when buying), or below the first resistance level (when selling). As soon as price crosses this threshold, it will place an order. If the balance settings allow for multiple orders, a buy order gets placed every time the buy conditions are met.

In the example below, SupRes_SPREAD is set to 0.1, the "buy at" line visualizes the target. The sell target would be 0.1 % below the first resistance level.

Keep in mind that support and resistance are not static targets. This makes the SupRes_SPREAD setting more or less a trailing range. It's very important to set a value that makes sense for the current pair and the price range it is in: too big of a spread can cause immediate trades.

The strategy sells when price crosses SupRes_SPREAD and GAIN is reached.


Gunbot uses the following formula to calculate support and resistance levels. The number of candles uses as input is user configurable with the SMAPERIODsetting.

P = (H + L + C) / 3 
R1 = (P 2) - L
R2 = P + (H - L)
S1 = (P 2) - H
S2 = P - (H - L)
Less options than usual

This strategy is a bit different from other strategies, it has much less configurable options. Confirming indicators or additional trailing are disabled.

Strategy settings for SupportResistance

Buy settings

LabelConfig ParameterDefault ValueDetailed Description
Allow Buy OrdersBUY_ENABLEDtrueEnables you to allow buy orders within this trading strategy. When set to true, the strategy can initiate buy orders based on other configured settings.
Support/Resistance SpreadSupRes_SPREAD0.1Sets the minimum percentage range from the first detected support or resistance level within which no orders will be placed. This applies to both buy and sell orders, ensuring that they are executed only after this buffer zone is maintained. The value represents a percentage of the price.
Maximum BuysSupRes_MAX0Use this setting to cap the number of times the strategy is allowed to execute buy orders. If the sum of your quote balance, value of open orders, and the upcoming order exceeds this set limit, further buy orders will not be placed. This is useful for managing exposure and budget.

Sell settings

LabelConfig ParameterDefault ValueDetailed Description
Allow Sell OrdersSELL_ENABLEDtrueEnables you to allow sell or short orders within this trading strategy. When enabled, it allows for the initiation of sell orders based on other strategy parameters.
Gain TargetGAIN1Defines the target gain percentage above the break-even point for sell orders. This setting helps you to set profit targets, where a sell order will be executed once this gain target is achieved, relative to the buying price.
Sell Order LimitCOUNT_SELL9999Limits the number of sell orders that can be placed for a trading pair, effective from the time the pair was added. This can help manage frequent trading on volatile pairs, ensuring a cap on the number of transactions.


LabelConfig ParameterDefault ValueDetailed Description
Candlestick PeriodPERIOD15 minutesSpecifies the duration of candlesticks used for the calculation of various indicators. This setting should align with the time frames supported by your exchange. The value is denoted in minutes, representing the candlestick period.
SMA PeriodSMAPERIOD30Determines the number of candlesticks used to calculate the Simple Moving Average, which is part of the Bollinger Bands, trend watcher, support and resistance, and Fibonacci retracements. This provides a basis for various trend and volatility assessments in the strategy.

Overview of effects on different order types

Config ParameterAffected Order TypesNot Affected Order Types
Buy EnabledStrategy buy, DCA buy, RT buy, RT buybackStrategy sell, Stop limit, Close, RT sell
Sell EnabledStrategy sell, Stop limit, RT sellStrategy buy, RT buy, RT buyback, Close, DCA buy
GainStrategy sellStrategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit
Sup / Res SpreadStrategy sell, Strategy buyStop limit, RT sell, RT buy, RT buyback, Close, DCA buy
Sup / Res MaxStrategy sell, Strategy buyStop limit, RT sell, RT buy, RT buyback, Close, DCA buy
PeriodStrategy sell, Strategy buy, DCA buy (trigger)RT buy, RT buyback, RT sell, Close, Stop limit
SMA PeriodStrategy sell, Strategy buyRT buy, RT buyback, RT sell, Close, Stop limit, DCA buy order