Username: Password:

Author Topic: Emotionless-Fast selling at a loss (and then buying back)?  (Read 7339 times)

Offline Larz

  • Rookie
  • *
  • Posts: 4
    • View Profile
last night Gunbot (12.9.9.2) closed a 10x leverage XBTUSD position on BitMex Testnet at a slight loss for no apparent reason (saying ROE reached, which was not the case).

Code: [Select]
[32m************************************************************************************************

BEGIN ROE TRAILING LOGS FOR LONG POSITION

************************************************************************************************

------------------------------------------------------------------------------------------------

2019/05/21 02:46:30: ROE TrailingBuy limit 1.98

------------------------------------------------------------------------------------------------

2019/05/21 02:46:30: Actual ROE         -0.44   |  ROE Target:   1.98

------------------------------------------------------------------------------------------------

2019/05/21 02:46:30: ROE Stop limit     2.02

------------------------------------------------------------------------------------------------

ROE raising up: activating Stop limit!!!

GBRT_v12.9.9.2 XBT-USD@bitmex_testnet Round #172 2019/05/21 02:46:30
from 10592
************************************************************************************************
Closing position, ROE reached!!!
************************************************************************************************
About to close position

2019/05/21 02:46:30: Closing position...

afterwards it bought straight back in - this all was immediately before a flash crash on BitMex Testnet where XBTUSD went from ~8000 down to 6500, up to 9000 and back to ~8000 (I guess someone was practising market manipulation...), so minutes later the new position got liquidated at 7500.

So I'm wondering

1) Why would Gunbot have closed the position at a 0.44% (leveraged 4.4%) loss to begin with?
2) Has any of this to do with the flash crash? (i.e. would the indicators have predicted the crash, suggesting to get out, which would be great, but then why would the bot buy back in immediately after?)

Offline Larz

  • Rookie
  • *
  • Posts: 4
    • View Profile
Re: Emotionless-Fast selling at a loss (and then buying back)?
« Reply #1 on: May 22, 2019, 09:15:01 AM »
I just realised that the 15 minutes period I had the strategy run at seems not to be supported by BitMex.

Could that be the reason for the behaviour?
I've now set it to 5 minutes.
« Last Edit: May 22, 2019, 09:16:11 PM by Larz »

Offline Aitor

  • Administrator
  • *****
  • Posts: 570
  • Telegram: @AitorRuiz Gunbot.shop
    • View Profile
    • Gunbot
Re: Emotionless-Fast selling at a loss (and then buying back)?
« Reply #2 on: May 22, 2019, 08:59:14 PM »
Hi Larz, yes, it's important to set one of the supported periods to avoid indesired behavior.