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.

Buy & sell settings

Buy settings are the primary trigger for buy orders. Sell settings control how sell orders are placed. These parameters control the execution orders when using supportresistance as buy & sell method.

Buy enabled

Set this to false to prevent Gunbot from placing buy orders.

Sell enabled

Set this to false to prevent Gunbot from placing sell orders.


This sets the minimum target for selling. Gunbot will sell once price reaches the set percentage above the break-even point. and SupRes_SPREAD is reached.

If you want to have at least 2% profit per trade, set this to 2.

Sup / Res spread

Sets the distance from support/resistance levels, in which orders may be placed.

For buying: this value is a percentage above the first support level.

For selling: this value is a percentage below the first resistance level.

Sup / Res max

Use this setting to limit how many times the strategy is allowed to buy, by setting a maximum allowed position size in base currency.

If the combined value of quote balance, open orders and the next order to place are higher than SupRes_MAX, then no further buy orders will be placed.

Indicator settings

These indicator settings have a direct effect on trading with supportresistance.


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.

SMA Period

This defines the number of candles used for calculating support and resistance level.