Skip to main content

Misc settings

These strategy settings allow you to control your stop limit, set order type per trigger and other uncategorized features.

Stop Limit

Sets a stop limit to sell a coin at a calculated loss.

After a stop limit sell order has been placed, the bot will go into buying mode after TRADES_TIMEOUT has passed and will buy again when market conditions meet your buying strategy.

Setting a stop limit at 60 would make sure that all holdings for a coin are sold when 60% value is lost, compared to the average bought price. E.g. average bought price is 100, stop limit is executed at 40 and all assets are sold.


tip

With futures trading, the stop limit is set as a ROE value. Setting it to 1 will lead to the stop limit triggering when ROE reaches -1. Use a value that includes your leverage.

It's recommended to use STOP_BUY / STOP_SELL instead, when possible.These are placed at the same time as the position is opened.



SL Disable Buy

When set to true, buy orders will be disabled after a pair hits STOP_LIMIT.

For futures trading, buy orders will be disabled when a long position hits STOP_LIMIT.


SL Disable Sell

When set to true, sell orders will be disabled after a short position hits STOP_LIMIT.


tip

Specific to futures trading.



Panic Sell

When set to true, all quote will be sold at market value as soon as possible. This may incur losses!

You should only enable this when you want to sell your current holdings immediately.

For futures trading, this setting will delete any open orders and close any position as soon as possible. Pairs are not automatically disabled afterwards.


Trades Timeout

Sets a timeout between two trades for a single pair, in this time no trades will be placed.


Count Sell

Sets a maximum number of sell orders before automatically disabling a pair.

Setting this to 5 disables the pair after 5 strategy sell orders took place (not including RT). No further trades will happen until you re-enable the pair. The COUNT_SELL counter gets reset after a pair is re-enabled.


tip

This parameter is irrelevant for futures trading.



Maker Fees

Futures platforms: When set to true, limit orders will placed as post only orders. If the order can be (partially) filled immediately, it will get cancelled by the exchange. Using PRE_ORDER you can configure how far from bid/ask the order gets placed, you must use a negative value for PRE_ORDER_GAP for post only orders.

Other exchanges: When set to true, limit buy orders are placed at bid, limit sell orders are placed at ask. This increases the likelyhood that the trade is executed with maker fees.


Ignore Trades Before

Optional parameter to force Gunbot to not consider any trades before the set timestamp.

Only ever use this when you know exactly what you are accomplishing, and for example want to prevent RT from being started on a pair where the last sell order resulted in a loss.

Use https://currentmillis.com/ to convert human readable time to unix timestamps, make sure to use the timestamp in milliseconds.


Bought price

Exchanges often don't provide order information anymore on trades that happened longer ago. This parameter exists to manually specify a reference price per unit that Gunbot should consider when selling an asset for which no bought price is provided by the exchange.

In short, with bought price you tell Gunbot the minimum price to sell your assets for.

This parameter should only be used as an override.

The override is only valid when no bought price can be retrieved from the exchange. In case you want to forcefully override an available bought price, you can apply IGNORE_TRADES_BEFORE and remove the pairs state json file after doing so.


tip

This parameter is irrelevant for futures trading



Liquidity maker

Use any strategy as a liquidity provider on spot markets, by using a simple staggered orders strategy that places orders at many positions in the order book.

Empty order book? Not anymore with liquidity maker.

Liquidity maker

Enables a staggered orders strategy variant that continuously places up to 9 orders on the bid side of the order book. If there is enough quote balance, up to 9 orders are placed on the ask side as well. You profit from the spread between bid and ask, provided the spread is higher than your trading fees.

Each order is in value of 1x TRADING_LIMIT. Potentially it can use your whole balance.

This works in addition to your regular strategy. You can disable the regular strategy by setting both buy and sell enabled to "false".


Liquidity taker

In addition to maker orders, use taker orders when reaching your targets or to DCA.

When GAIN is reached, every round a market sell order of 1x TRADING_LIMIT gets placed to reduce your position in profit.

When price drops below the average bought price, every round a market buy order of 1x TRADING_LIMIT gets placed to bring down the average price per unit.


Liquidity gain

Option to enforce sell orders to be placed at or above break-even.
Disable this to provide pure liquidity.


Max invested base

Limits the total position size for liquidity maker and taker orders. When the maximum value is reached, no more liquidity maker or taker orders that would add to the position are placed .


Order type settings

On exchanges that support market orders, you can select which types of orders should be sent as limit or market.


tip

Not all exchanges support market orders

Test if your market orders execute before leaving your strategy run unattended.


Market Buy

When set to true, strategy buy/long orders will be placed as market order.


Market Sell

When set to true, strategy sell/short orders will be placed as market order.


Market RT Buy

When set to true, RT_BUY orders will be placed as market order.


Market RT Sell

When set to true, RT_SELL orders will be placed as market order.


Market Buyback

When set to true, RT Buyback orders will be placed as market order.


Market DU

When set to true, DU orders will be placed as market order.


Market Close

When set to true, position close orders at Bitmex will be placed as market order.


Market Stop

When set to true, position stop orders at Bitmex will be placed as market order.


Market FOK

When set to true, FOK orders will be placed as market order. This refers to orders placed within CANCEL_ORDERS_CYCLE_CAP.


Take Buy

Buy trailing with Take Buy is a bit different, because it acts as a second buy layer in your strategy.

The idea is that sometimes prices will come close to your target, but not close enough for your main strategy to catch a buy. In this case you can use Take Buy as an extra threshold above your regular entry point.

The example above shows that price was on its way reaching the primary buy trigger Buy Level, but didn't quite make it. Instead, Take Buy took the order when prices started moving upwards again.

Take Profit

Similar to Take Buy, Take Profit acts as a secondary sell layer in your strategy. It trails between the break-even point and the target for Gain. In case prices do move over your Gain target, trailing stops and the normal strategy conditions apply.

Take Buy

With this setting enabled, Gunbot will try to take any buy chance between the strategy entry point and your setting for TBUY_RANGE.

As soon as the ask price drops below the upper border of this range (called "Take Buy"), it will trail down with a range of TBUY_RANGE and place a buy order as soon as the ask price crosses up "Take Buy". Confirming indicators in use are respected.

Normal strategy buy orders are still possible while using TAKE_BUY.

This option should not be used together with reversal trading.


TBuy Range

This sets the buy range for TAKE_BUY.

When set to 0.5, the initial trailing stop is set 0.5% above the entry point defined by BUY_LEVEL.


Take Profit

With this setting enabled, Gunbot will try to take any possible profit between the break-even point and your strategy exit point. This can be useful, for example, on days where the markets move very slowly.

It works by trailing prices upwards between the break-even point and the strategy exit point, with a configurable range for trailing: TP_RANGE. A sell order will be placed when the trailing stop limit is hit or strategy sell conditions are reached. Confirming indicators in use are respected.

Sells at minimal loss are possible when using TAKE_PROFIT, acting as a sort of mini stop loss.

This option should not be used together with reversal trading or DOUBLE_CHECK_GAIN


TP Range

This sets the sell range for TAKE_PROFIT.

When set to 0.5, the initial trailing stop is set 0.5% below the break-even point.


TP Profit Only

Enable this to only allow sell orders above the break-even point.