Username: Password:

Author Topic: changing config file while gunbot is running  (Read 19172 times)

Offline Molecularfir

  • Rookie
  • *
  • Posts: 4
    • View Profile
changing config file while gunbot is running
« on: September 25, 2017, 11:44:35 PM »
Does anyone know if you can change the config file while gunbot is running? For example, say I'm running BTC-ETH on a BB 25 (low) - BB 25 (high) and I want to change to step gain sell strategy after the coin have been brought then can I simply edit the config file?

Thanks for your help.

Offline paramecie

  • Contributor
  • **
  • Posts: 302
    • View Profile
Re: changing config file while gunbot is running
« Reply #1 on: September 26, 2017, 12:27:51 AM »
Sure you can it'll detect and apply.

Only problem, and AFAIK and as much the Dev wrote about this (none), I think it'll reset the averages SMA, EMA1, EMA2, BB... as if you just started the bot.

Offline sloaleks

  • Contributor
  • **
  • Posts: 610
    • View Profile
Re: changing config file while gunbot is running
« Reply #2 on: September 27, 2017, 12:46:37 PM »
I'm on 504. Config save seems to make some kind of a hot reset, just a disconnect and connect back to the exchange. I'll have to look at it deeper to see if the bot looses data on the EMAs and BBs (not sure).

Offline paramecie

  • Contributor
  • **
  • Posts: 302
    • View Profile
Re: changing config file while gunbot is running
« Reply #3 on: September 27, 2017, 03:11:13 PM »
I'll have to look at it deeper to see if the bot looses data on the EMAs and BBs (not sure).

It must: suppose you just changed the EMA settings, how could it use the previous EMA?
In short, if EMA is 2 hours, it'll take 2 hours to get a reliable EMA back.

IMO...

Offline sloaleks

  • Contributor
  • **
  • Posts: 610
    • View Profile
Re: changing config file while gunbot is running
« Reply #4 on: September 27, 2017, 08:58:46 PM »
ema is a period expressed in trades, not hours. in stepgain default settings  for ema 1 and 2 are 2000 and 1000. it would take a heck of long time to establish ema if it were in hours ...
I was under the impression that since 501 ema, sma and bbs are logged.
copy from the instructions for 501:
 ... Exposing TA values in logs (EMA1, EMA2, HIGHBB, LOWBB, SMA)
« Last Edit: September 27, 2017, 09:06:42 PM by sloaleks »

Offline paramecie

  • Contributor
  • **
  • Posts: 302
    • View Profile
Re: changing config file while gunbot is running
« Reply #5 on: September 27, 2017, 11:45:33 PM »
You're mainly right, but...

To make an EMA 200, you first have to collect 200 averages (1 price, then average of 2, then average of 3... up to average of 200).
Only then, you can start the EMA, which is a formula of the current price and its weight applied to the previous result (the 200 averages).
The next EMA is the same on the previous EMA, etc.

That means 2 things:

* before the first 200 averages are done, the EMA is NOT an EMA - the bot decision could be weaker (or better) one, but is a different one.

* there is NO WAY to save (on file) this, especially while you can change the EMA 200 to EMA 500 or 42 between 2 runs of the bot.

But, if Gunbot is smart, it can keep in memory the past prices, and when it's reconfigured it can recalculate the whole EMA "chain".

If it works like this, yes, EMA can be brought back immediately (recalculated) after the reconfig.

But no, it can't be saved, so at a fresh start it has to wait for the 200 prices.
Which can take time - you say trades, I would have said price ticks (25s each), but yes you're probably right, it may get the trades of the current price tick duration...
It still can take some time for pairs with low volume of transaction...

Offline paramecie

  • Contributor
  • **
  • Posts: 302
    • View Profile
Re: changing config file while gunbot is running
« Reply #6 on: September 28, 2017, 12:19:15 AM »
I made a test on Bittrex.
The API can give you the current 200 historical trades.

OK, that means you can have a valid EMA <= 200 when starting the bot.

What worries me if those numbers EMA 2000 or 1000.
On DOGE you'ld get 200 in 55 minutes (at this current moment).
2000 would take 10 hours ?

Ohhh I see - Gunthar is a smart guy!!!
He has one or more servers that queries all the trades permanently, and when Gunbot starts, it must download from Gunthar's servers the needed history trades...
Et voilą.

gg! :P

Offline sloaleks

  • Contributor
  • **
  • Posts: 610
    • View Profile
Re: changing config file while gunbot is running
« Reply #7 on: September 28, 2017, 06:15:19 AM »
Ohhh I see - Gunthar is a smart guy!!!

hehe. he is, isn't  he?  8) allthough I'm not sure I know how it works ... I try decyphering little bits at a time from hints here and there on github.

Offline paramecie

  • Contributor
  • **
  • Posts: 302
    • View Profile
Re: changing config file while gunbot is running
« Reply #8 on: September 28, 2017, 11:57:35 AM »
BTW, it also explains why the 5.x version licence is a pain, and a different process.

Your 3.x version won't work on 5.x until it's registered on this specific 5.x History Server...