Gunbot wiki
Wiki em português
English
English
  • Welcome to the Gunbot wiki
  • About
    • What's new?
      • New in v22
      • New in v20
      • New in v18
      • New in v16.7+
      • New in v16
      • New in v15
      • New in v13 / v14
      • New in v12
      • New in v11
      • New in v10
      • New in v9
      • New in v8
      • New in v7
      • New in v6
    • Supported exchanges
      • Creating API keys
      • Websockets support
    • License info & system specs
      • How to create a wallet
    • Purchasing Gunbot
  • Setup & general settings
    • Installation & startup
      • Quickstart guide
      • Download software
      • Windows installation
      • macOS installation
      • Linux installation
      • ARM installation
      • How to enable SSL/TLS
      • Running multiple instances
      • Headless mode
    • Global settings
      • Import settings
      • Bot settings
      • Cancel orders
      • Advanced
    • Profile settings
      • Exchanges
      • Gunthy wallet
      • Edit license
      • GUI authentication
      • Telegram
      • Tournament
  • How to work with Gunbot
    • Learning the basics
      • Trading logic
      • Important settings
      • Order types
      • Period
      • Trailing
      • ROE trailing
    • Strategies & pairs
      • Easy edit
      • Strategy editor
      • Trading pairs
        • Pair processing
    • Chart & results
    • Extra modules
      • AutoConfig
      • Backtesting
      • Code editor
      • TradingView Alerts
        • IMAP listener
      • Alerts (beta)
  • Trading strategy options
    • About Gunbot strategies
      • Trading methods
      • Protections
    • Regular strategies (spot trading)
      • ADX
      • ATRTS
      • Bollinger Bands
      • Bollinger Bands (TA)
      • EMA spread
      • Emotionless
      • Gain
      • Ichimoku
      • MACD
      • MACDH
      • Pingpong
      • Stepgain
      • Spotgrid
      • Spotgrid Advanced
      • StepGrid
      • SMA cross
      • Support / Resistance
      • Tssl (trailing stop / stop limit)
      • Time series analysis
    • Margin trading strategies
      • ADX
      • ATRTS
      • Bollinger Bands
      • Bollinger Bands (TA)
      • EMA spread
      • Futures Grid
      • Gain
      • Ichimoku
      • MACD
      • MACDH
      • Pingpong
      • Stepgain
      • SMA cross
      • Tenkan
      • Tssl (trailing stop / stop limit)
      • Time series analysis
    • Custom strategies
    • Balance settings
    • Confirming indicators
    • Dollar Cost Avg (DCA)
    • Reversal trading (RT)
    • TrailMe
    • Misc settings
  • More
    • Config marketplace
  • Various
    • Backups
    • Logs
    • Handling bags
    • Acronyms
  • Troubleshooting
    • Critical errors
    • Bot does not trade
    • Reset password
Powered by GitBook
On this page
  • How to work with this strategy
  • Formula
  • Strategy parameters
  • Buy & sell settings
  • Buy enabled
  • Sell enabled
  • Gain
  • Sup / Res spread
  • Sup / Res max
  • Indicator settings
  • Period
  • SMA Period
  • Balance settings
  • Misc settings
  • DCA settings
  • Reversal trading
  • TrailMe settings
  • Confirming indicators

Was this helpful?

  1. Trading strategy options
  2. Regular strategies (spot trading)

Support / Resistance

PreviousSMA crossNextTssl (trailing stop / stop limit)

Last updated 4 years ago

Was this helpful?

Buy at support, sell at resistance. That's all this strategy does. You can configure a distance from support and resistance, to configure a range where it will trade.

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.

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

Formula

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 parameters

Following settings options are available for SupportResistance and can be set in the strategy configurator of the GUI or the strategies section of the config.js file.

These settings are global and apply to all pairs running this strategy. When you want a specific parameter to be different for one or more pairs, use an override at the pair level.

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 of buy orders when using SupportResistance as buy & sell method.

Buy enabled

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

Values: true or false

Default value: true

Affects

Does not affect

Strategy buy

Strategy sell

DCA buy

Stop limit

RT buy

Close

RT buyback

RT sell

Parameter name in config.js: BUY_ENABLED

Sell enabled

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

Values: true or false

Default value: true

Affects

Does not affect

Strategy sell

Strategy buy

Stop limit

RT buy

RT sell

RT buyback

Close

DCA buy

Parameter name in config.js: SELL_ENABLED

Gain

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.

Values: numerical – represents a percentage.

Default value: 0.5

Affects

Does not affect

Strategy sell

Strategy buy

RT buy

RT buyback

RT sell

Close

DCA buy

Stop limit

Parameter name in config.js: GAIN

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.

Values: numerical, represents a percentage (of price)

Default value: 0.1

Affects

Does not affect

Strategy sell

Stop limit

Strategy buy

RT sell

RT buy

RT buyback

Close

DCA buy

Parameter name in config.js: SupRes_SPREAD

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.

Values: numerical, represents a value in base currency

Default value: 0

Affects

Does not affect

Strategy sell

Stop limit

Strategy buy

RT sell

RT buy

RT buyback

Close

DCA buy

Parameter name in config.js: SupRes_MAX

Indicator settings

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

Period

This sets the candlestick period used for trading, this affects all indicators within the strategy.

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

Values: numerical– represents candlestick size in minutes.

Default value: 15

Affects

Does not affect

Strategy sell

RT buy

Strategy buy

RT buyback

DCA buy (when using an indicator to trigger)

RT sell

Close

Stop limit

Parameter name in config.js: PERIOD

SMA Period

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

Values: numerical – represents a number of candlesticks.

Default value: 50

Affects

Does not affect

Strategy sell

RT buy

Strategy buy

RT buyback

RT sell

Close

Stop limit

DCA buy order

Parameter name in config.js: SMAPERIOD

Balance settings

Misc settings

DCA settings

This strategy cannot use DCA. Averaging down is natively implemented by allowing multiple buy orders.

Reversal trading

This strategy cannot use reversal trading.

TrailMe settings

This strategy cannot use TrailMe.

Confirming indicators

This strategy cannot use confirming indicators.

Using the BUY_METHOD and SELL_METHOD parameters you can combine different methods for buying and selling. This strategy page assumes both BUY_METHOD and SELL_METHOD are set to SupportResistance. Accepted values are all strategy names as listed .

Only use .

Balance settings
Misc settings
supported values
here