Username: Password:

Author Topic: Humble suggestion for allpairs  (Read 19656 times)

Offline cw

  • Rookie
  • *
  • Banned!
  • Posts: 57
    • View Profile
    • Gunbot University
Humble suggestion for allpairs
« on: May 17, 2017, 07:11:01 PM »
From Another post...
Quote
I suggest it always use the AllPairs as the override regardless of which is saved last. 

I can't highlight or agree with this enough.  Please change it so that the use of a "default" configuration file and an "override" file uses the same standard as every other system everywhere else - unix, windows, applications, etc.

The concept of "configuration file precedence" is a global one and I propose we try to adhere to it if at all possible.

1. System local directory -- highest priority
2. App local directories
3. App default directories
4. System default directory -- lowest priority

Example: Unix operating systems have /etc directory and programs will have settings stored there.  They will first load settings, if they exist from /etc/settings.conf.  Then, if there are settings in ~/settings.conf, they will, one-by-one, look for settings. If there are settings in the local user's setting.conf, then the settings there will override the /etc/settings.conf.

Example: applications will have config files with stanzas.  A locally defined file with settings would have highest priority and a higher level file with stanzas with defaults would have lowest priority.

Therefore, in gunbot's world, the ALLPAIRS file would be the lowest priority.  Users would put anything they want all pairs to use by default:

  • API Keys
  • Default BOT timings
  • Startup options
  • Debug options
  • Email settings
  • Any buying / selling strategies that are considered "default"

Then, in the per-pair settings files, you would only put non-default items or items that would OVERRIDE the items in the default allpairs file.

  • THIS PAIR's strategy
  • [could be, nothing else is needed to change]

This is useful is you wanted 20 pairs all using BB buy and GAIN sell with normal BOT timings.  Then if you wanted 3 pairs to use PING PONG, you would just edit the strategy of the config file of just those pairs.  You wouldn't need the strategies to be set in the other pairs.

However, the current problem is that because gunbot looks at the access time of which file was most recently modified, if you go and change the ALLPAIRS file to adjust BOT timings, for example... because polo is lagging, then all of a sudden the 3 pairs using PING PONG will now switch strategies.  We don't want that.

So the suggestion is to have gunbot ignore the last access time of config files, and only use this logic:
  • gunthy first reads allpairs file for settings
  • then reads per-pair settings, which overrides any settings collected from allpairs

Cointracking affiliate link (10% discount for you) https://cointracking.info?ref=C937652