Username: Password:

Author Topic: StepGrid strategy selling lower amount  (Read 230 times)

Offline markojokic

  • Rookie
  • *
  • Posts: 1
    • View Profile
StepGrid strategy selling lower amount
« on: December 21, 2021, 07:52:23 AM »
Hey all, I have been playing for a few weeks with the new StepGrid strategy and I have noticed a strange behaviour, not sure if it's a bug or it's intended to work that way.

I am trading USDT-ETH pair on binance. I have set trading limit to be 100 USDT. Everything works great except the following thing.

Lets take the example from this morning. Bot buys 99.7260 USDT worth of ETH (I understand that even though I have set 100 USDT as trading limit, because of fees bot buys with 99.7260 USDT amount). When it's time to sell, bot sells 0.0248 ETH which is worth 99.7377 USDT.

My question here is, why bot haven't sold the whole amount of ETH it previously bought? Is it possible to adjust my settings somehow to fix this?


Easier to visualise example:

Code: [Select]
        Rate        Amount      Total
SELL    4021.68     0.0248      99.7377

BUY     4005.06     0.0249      99.7260

Thanks in advance!

Offline sbogovac

  • Contributor
  • **
  • Posts: 110
    • View Profile
Re: StepGrid strategy selling lower amount
« Reply #1 on: December 21, 2021, 08:18:09 AM »
Hey all, I have been playing for a few weeks with the new StepGrid strategy and I have noticed a strange behaviour, not sure if it's a bug or it's intended to work that way.

I am trading USDT-ETH pair on binance. I have set trading limit to be 100 USDT. Everything works great except the following thing.

Lets take the example from this morning. Bot buys 99.7260 USDT worth of ETH (I understand that even though I have set 100 USDT as trading limit, because of fees bot buys with 99.7260 USDT amount). When it's time to sell, bot sells 0.0248 ETH which is worth 99.7377 USDT.

My question here is, why bot haven't sold the whole amount of ETH it previously bought? Is it possible to adjust my settings somehow to fix this?


Easier to visualise example:

Code: [Select]
        Rate        Amount      Total
SELL    4021.68     0.0248      99.7377

BUY     4005.06     0.0249      99.7260

Thanks in advance!


Unfortunately, it seems to be a "feature" of StepGrid. As we speak StepGridHybrid is being user-tested which addresses this behaviour. Unfortunately it is not available for all exchanges (and thus users) yet...


Offline RobinPogo

  • Rookie
  • *
  • Posts: 1
    • View Profile
Re: StepGrid strategy selling lower amount
« Reply #2 on: December 28, 2021, 10:32:49 AM »
Because of this behavior, it often happens that the bot sells for less than it buys especially for "small" amounts*. It usually resolves by itself when the PA is above break even and the whole bag is sold. Given how setpGrid works, it might take a while before it happens since there is no DCA involved to lower the break-even PA. A workaround I applied is to increase the fees of the exchange. For Binance, I set it to 0.75 instead of 0.1. The bot trades less, but the trades are more meaningful. If I'm not misleading, the sell price is computed so the profit is larger than 2 * exchange fees. With my settings, the net profit taken should be at least 1.5 - 0.2 = 1.3 %, minus the 'dust'.

With this approach, I am rarely disappointed of the results when the position is sold, which was happening in the past. I used to have a position in a coin which lasted several days only to realize that I had made like 0.30 USDT of profit while investing hundreds of USDT.

However, it is worth noting that when the PA is close to the ATH, it might be difficult to sell the whole bag. So pay attention to shitcoins if you are using the same approach. More generally, trading close to the ATH is risky anyway.

* small in comparison to the coin unit, so $100 is considered a small amount. Moreover, one needs to take into account that a market order implies an unpredictable sell price, adding some uncertainty to the actual profit taken.
« Last Edit: December 28, 2021, 10:39:06 AM by RobinPogo »

Offline felixinbali

  • Rookie
  • *
  • Posts: 5
    • View Profile
Re: StepGrid strategy selling lower amount
« Reply #3 on: January 07, 2022, 01:08:43 PM »
I just posted the exact same behaviour with SpotGrid Advanced strategy. It's actually not a small issue - It affects profits on the trade.

Offline Aitor

  • Administrator
  • *****
  • Posts: 550
  • Telegram: @AitorRuiz Gunbot.shop
    • View Profile
    • Gunbot
Re: StepGrid strategy selling lower amount
« Reply #4 on: January 09, 2022, 06:35:56 AM »
I checked this with Spot Grid and sometimes it sells a bit less while sometimes sells a bit more... so it's something that doesn't affect in the mid-long term results. Anyway, dev team is already aware of it.