ctubio / Krypto-trading-bot

Self-hosted crypto trading bot (automated high frequency market making) written in C++
https://127.0.0.1:3000
Other
3.33k stars 819 forks source link

uummm.....help me understand this behavior (order times) #1096

Closed Corfucinas closed 3 years ago

Corfucinas commented 3 years ago

@ctubio I only intend to put pings at bid size, 1 trade every 900 seconds and sell them at short ping aggressive, even if the FV moved against me, I only wish to sell at a profit the latest ping...not sure why it went like this and just went crazy on both sides.

Settings

image

Logs image

UI

image

Corfucinas commented 3 years ago

Well....it ate my entire wallet in 10 minutes...

image

eniware-org commented 3 years ago

This is connected to the issue https://github.com/ctubio/Krypto-trading-bot/issues/1047#issue-794406528 The bot erroneously treats your orders as pongs and there is no Max Trades per seconds for PONG. There is a further discussion here: https://github.com/ctubio/Krypto-trading-bot/discussions/1069#discussion-3238533

Corfucinas commented 3 years ago

:face_with_head_bandage: :hammer:

Corfucinas commented 3 years ago

@eniware-org

Only affects boomerang? I'm noticing something weird, the balance in your wallet goes to 0 from pings if the FV moves against you

ie:

You buy 1 at $10, pong at $11 FB is now $9, you hold "0" in your wallet balance pings and pongs do not respect the time and will eat the entire wallet in both sides when possible Also, this seems to happen once all pings are matched

eniware-org commented 3 years ago

Affects all - see here: https://github.com/ctubio/Krypto-trading-bot/blob/a9ce28ef802fde1837bbda275823a5a46450c5b6/src/bin/trading-bot/trading-bot.data.h#L2458

Corfucinas commented 3 years ago

@eniware-org

Is this something related...?

image

I just bought with pingpong and ping at BidSide...the ping is respecting the trade time limit, but my wallet shows 0...and depleted funds

Corfucinas commented 3 years ago

@ctubio

Hola! Como vas?

Any updates in regards of this ? :<

ctubio commented 3 years ago

im trying hard to reproduce this on binance and on bitfinex; i had copied your quoting parameters aaaaand.. hope for it to be reproduced :S (if you have any other hint of how this may be reproduced please lemme know)

thanks for insist on this''

ctubio commented 3 years ago

:koala: somehow i reproduced it (but with a few trades instead of so many like you; hope we are infront of the same situation, lemme understand it and provide a fix); seems ping trades are wrongly considered pongs for a brief timespan while another trade has been super recently filled; i suspect the timer each 1 second calculating stats is not fast enough while also filling orders :man_dancing: a bad solution in the worst scenario is to just add a delay somehow after trades are done, to avoid further imminent trades get tangled statuses before stats are reprocessed, but lemme spend some time looking for a faster non-delayed solution

eniware-org commented 3 years ago

Excellent! Thank you very much for resolving this @ctubio !