Reply To: Gunbot v23.x Beta changelogs

Gunbot Shop Gunbot Forum General Discussion Gunbot v23.x Beta changelogs Reply To: Gunbot v23.x Beta changelogs

  • Posts: 247
  • Moderator

Gunbot v23.1.2_beta

– Fix pipe error

– Implement stepGridHedge for bybit.

— Expected behavior:
The strategy uses the same order triggers as stepGrid does on spot, but in quite a different way.
Imagine stepGrid trading futures longs, when it encounters a sell step below the avg entry price (which would cause a loss on the long side), it will fire a trade on the short side. The same principle works on basically any situation stepGrid can encounter: it fires an order in the direction that is either profitable or does not cause a loss by firing the order.
Additionally, there are some none configurable methods that prevent dca orders to try to not accumulate too much too fast.
It gets more profitable once it had time to accumulate positions bigger than a few tl, which it will close in many parts – ever further away from avg entry. Long times of sideways trading are the main enemy of this strategy, because there is a risk of accumulating too much around similar prices.

How to configure pairs:
Set both the short and long pair like below, the short pair is only there to collect data and visualize trades. The settings for the short pair only make sure it never trades.
The long pair does the actual trading on both sides. Always make sure to have the short pair before the long pair.
There is no GUI strategy editor yet.

“pairs”: {
“bybit”: {
“strategy”: “hedge”,
“enabled”: true,
“override”: {
“PERIOD”: “5”,
“MAX_BUY_COUNT”: “500”,
“BUY_ENABLED”: false,
“SELL_ENABLED”: false,
“BUY_METHOD”: “gain”,
“SELL_METHOD”: “gain”,
“LONG_LEVEL”: 100,
“BUY_LEVEL”: 100,
“GAIN”: 100,
“ROE”: 100000,
“strategy”: “hedge”,
“enabled”: true,
“override”: {
“PERIOD”: “5”,
“BUY_METHOD”: “stepGridHedge”,
“SELL_METHOD”: “stepGridHedge”,

The settings above are something I use on a ~500 USDT test wallet with no other pairs active.

TRADING_LIMIT: in USDT, is the regular amount per initial or dca order, first few orders can sometimes use 1.5x or 2x this amount
MAX_BUY_COUNT: maximum position size (measured in ‘tl’) per side. Bot won’t add more to the position if this threshold is reached
MAX_UNHEDGED: max unhedged position size, the imbalance between long and short. For example if long is 20x tl and short is 5x tl, there is 15x tl unhedged. Bot won’t add more to the position if this threshold is reached
STOP_AFTER_CLOSE_LONG: when true, bot doesn’t open a new long after closing one
STOP_AFTER_CLOSE_SHORT: when true, bot doesn’t open a new short after closing one
Other stepGrid specific settings like manual step size also work, in exactly the same way as on stepGrid for spot trading.

There’s one caveat with order sizes on Bybit, the min order size is rather big and makes it hard to estimate how many tl a position currently is. For example if ETH is trading at 3000 and the min order size is 0.01 ETH in value, then a trading limit of 31 or 35 will both result in buying 0.01 eth.
This makes MAX_BUY_COUNT and MAX_UNHEDGED a bit imprecise when trading with a tl close to the minimum order size. You can see the current counts in the console logs.

About the pipe error: if you dont want to upgrade to this build and you are running a previous build you like and you get the error, do this:

>> Add to your etc/host the following line



Gunbot Shop -