Username: Password:

Author Topic: GUNBOT bought twice using more funds than it's supposed to  (Read 33088 times)

Offline gionni

  • Rookie
  • *
  • Posts: 23
    • View Profile
GUNBOT bought twice using more funds than it's supposed to
« on: April 16, 2017, 07:15:16 PM »
Hi I believe this is for Gunthar.
I started the bot this morning for a pair, came back after a few hour and I see 2 buys, both for the max btc allowed.
I checked to see if there were 2 bots running the same pair but it is not the case.
I usually understand what the bot is doing but this time I'm lost...

Logs are attached.
CONFIG:

BUYLVL1: 0.8, // first level margin to buy when currency decreases its value (example: buy when currency decreases 1% of EMA)
   BUYLVL2: 0.8, // second level margin to buy when currency decreases its value (example: buy when currency decreases 3% of EMA)
   BUYLVL3: 20, // third level margin to buy when currency decreases its value (example: buy when currency decreases 5% of EMA)
   SELLLVL1: 1, // first level margin to sell when currency increases its value (example: sell when currency increases 2% of paid)
   SELLLVL2: 1, // second level margin to sell when currency increases its value (example: sell when currency increases 5% of paid)
   SELLLVL3: 70, // third level margin to sell when currency increases its value (example: sell when currency increases 10% of paid)
   BUYLVL: 3, // buy level you want your gunbot to reach (example: i want my gunbot to buy when price reaches level 3)
   SELLLVL: 3, // sell level you want your gunbot to reach (example: i want my gunbot to sell when price reaches level 3)
   BTC_TRADING_LIMIT: 0.01,// max amount of BTC balance to use for each pair
   SECURITY_MARGIN: 40, // sell all balance if currency decreases x% after you bought it
   SELL_ON_START:false,
   CANCEL_SELL_ORDERS_ON_START:false,

   MAX_LATEST_PRICES: 30,// limit of latest prices to analyze to determine if price is growing or falling
   MAX_LATEST_DIRECTIONS:30,// limit of latest  price directions ,used in supergun detection

   STARTEMA1: 0.02,// weighted average interval in hours
   STARTEMA2: 0.04,// weighted average interval in hours
   PERIOD: 15,   // candlestick period


PS. Man, sold the pink too early and double buy of a dropping coin... And even so I still have 2% more than yesterday overall :D

Offline Gunthar

  • Administrator
  • *****
  • Posts: 287
    • View Profile
Re: GUNBOT bought twice using more funds than it's supposed to
« Reply #1 on: April 16, 2017, 07:46:13 PM »
YEs this is coded on purpose: during a pump, if there is a stop, the bot doesnt know if the price will fall or raise up, so it places a sell order. If then, the pump continues, it buys again. Result: 2 buy and 1 sell in total at the same time.

Offline gionni

  • Rookie
  • *
  • Posts: 23
    • View Profile
Re: GUNBOT bought twice using more funds than it's supposed to
« Reply #2 on: April 16, 2017, 08:06:40 PM »
mmm ok I don't see the sell in my case.
And the problem here I think is that the bot made 2 buys using the max allowed each time without a sell in between so basically it didn't respect the limit of the settings.

Offline Gunthar

  • Administrator
  • *****
  • Posts: 287
    • View Profile
Re: GUNBOT bought twice using more funds than it's supposed to
« Reply #3 on: April 16, 2017, 08:27:35 PM »
Mine wasnt a question: your bot placed a sell in the middle of 2 buys (which is prolly still in yoru open orders)

Offline gionni

  • Rookie
  • *
  • Posts: 23
    • View Profile
Re: GUNBOT bought twice using more funds than it's supposed to
« Reply #4 on: April 16, 2017, 08:57:23 PM »
You are obviously right, the sell is still there!
Still at the end of the road, the sell did not go, the bot used twice the amount he was supposed to spend, it did not sell afterwards and so I'm holding the bag I was willing to risk plus another one.
I understand the strategy but I still feel like the bot is not respecting the indication I gave.


Offline Gunthar

  • Administrator
  • *****
  • Posts: 287
    • View Profile
Re: GUNBOT bought twice using more funds than it's supposed to
« Reply #5 on: April 16, 2017, 09:31:09 PM »
it has been discussed and decided so: you cant risk to miss a pump so > (buy - sell + buy = trading limit respected). The filling of the sell order doesnt depend on the bot itself but on polo order book (nor the bot can bother to wait for a sell order to be filled, risking to lose further possibilities of trading)
We did talk a lot in the telegram group about this behaviour before to push it.
If you want to avoid this: raise the % to sell and the bot will not sell at the stop: it will continue with one buy and one sell.

Offline gionni

  • Rookie
  • *
  • Posts: 23
    • View Profile
Re: GUNBOT bought twice using more funds than it's supposed to
« Reply #6 on: April 16, 2017, 09:35:18 PM »
Quote
If you want to avoid this: raise the % to sell and the bot will not sell at the stop: it will continue with one buy and one sell.
Raise LEVEL 1 and 2?

Offline Gunthar

  • Administrator
  • *****
  • Posts: 287
    • View Profile
Re: GUNBOT bought twice using more funds than it's supposed to
« Reply #7 on: April 16, 2017, 09:40:14 PM »
Quote
If you want to avoid this: raise the % to sell and the bot will not sell at the stop: it will continue with one buy and one sell.
Raise LEVEL 1 and 2?

Yes Sir

Offline gionni

  • Rookie
  • *
  • Posts: 23
    • View Profile
Re: GUNBOT bought twice using more funds than it's supposed to
« Reply #8 on: April 16, 2017, 10:04:57 PM »
Oh you mean make selllevels all the same
Still maybe playing with the security_margin might be better for limiting bag holding but it's good to know!

Offline Kraddler

  • Rookie
  • *
  • Posts: 5
    • View Profile
Re: GUNBOT bought twice using more funds than it's supposed to
« Reply #9 on: April 16, 2017, 10:08:36 PM »
Gunthar, does the bot use the buylevels when buying again in a pump? Or are they ignored in that case?

Offline Gunthar

  • Administrator
  • *****
  • Posts: 287
    • View Profile
Re: GUNBOT bought twice using more funds than it's supposed to
« Reply #10 on: April 16, 2017, 10:18:46 PM »
Gunthar, does the bot use the buylevels when buying again in a pump? Or are they ignored in that case?

yes it does

Offline Kraddler

  • Rookie
  • *
  • Posts: 5
    • View Profile
Re: GUNBOT bought twice using more funds than it's supposed to
« Reply #11 on: April 16, 2017, 10:24:48 PM »
Ok, that means, the lower your buylevel is the bigger is the chance to stay in that pump. Advantage for kickass settings. But on the other hand in a dump the chances are also higher to buy although you actually don't want to buy. Right?

Offline Gunthar

  • Administrator
  • *****
  • Posts: 287
    • View Profile
Re: GUNBOT bought twice using more funds than it's supposed to
« Reply #12 on: April 16, 2017, 10:34:20 PM »
Ok, that means, the lower your buylevel is the bigger is the chance to stay in that pump. Advantage for kickass settings. But on the other hand in a dump the chances are also higher to buy although you actually don't want to buy. Right?

It buys only if there is a reverse of the trend based on volume and price going up again