Gekko Forum
New Gekko features # pull request brainstorming # github.com/mark-sch - Printable Version

+- Gekko Forum (https://forum.gekko.wizb.it)
+-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html)
+--- Forum: General Discussion (https://forum.gekko.wizb.it/forum-14.html)
+--- Thread: New Gekko features # pull request brainstorming # github.com/mark-sch (/thread-57484.html)



New Gekko features # pull request brainstorming # github.com/mark-sch - mark.sch - 07-31-2018

Hi Mike, Hi Gekko community,

I am opening up this thread to brainstorm and discuss new Gekko code commits which might be of general interest. The goal is to collect feedback before opening a pull request for the main Gekko development branch.

On the way with my crypto gameplan I started with some Postgresql db features (Mike merged them) followed by new Gekko exchange support (HitBTC, HuobiPro and OKEX),  a couple of telegram bot improvements like manual, immediate buy/sell support inside a password protected admin area and keyboard-button support for quick telegrambot feature access. Beside this I added some smaller convenience features which simplified my daily Gekko use.

Ok, maybe let's start with two commits:


https://github.com/mark-sch/gekko/commit/50a5510e01ee511ac7afb1272dc04b10094bb352

This one adds a new command line option for Gekko to quickly set/override a config setting for the current Gekko CLI run, example:
node gekko --config config-eth.js --backtest --set debug=false

The idea: I often run Gekko with debug messages enabled but during backtest mode I get a better, more useful output without debug messages. So instead of touching the config file for this, it is now possible to override config settings on-the-fly. Of course other config settings can also be changed this way.




https://github.com/mark-sch/gekko/commit/5514da94e64586d425dbd45919a0cd357eb314b3

Gekko keeps track which plugin is able to run in which Gekko mode, e.g. the Trader plugin does not run in backtest mode but the Paper Trader is used both in realtime and backtest Mode. These modes are configured with property "mode" inside plugins.js file. Gekko will automatically disable a plugin which is not allowed to run within a certain mode. The other way around, there are modes where a certain plugin is mandatory to run this mode. E.g. the Paper Trader is mandatory to run the backtest mode properly. For that reason I added a new plugins.js property "mandatoryOn" to document mandatory plugins for a certain mode. When a plugin is declared to be necessary for a certain mode, it will now automatically be enabled for that certain mode (like automatic disabling when not allowed for a certain mode). This small change gave me a lot of convenience on my live server, since there is no need anymore to touch any config files or to maintain several config files for a quick backtest. It also helps documenting which modes and plugins belong together.

Any thoughts? If you consider it to be of general interest, I could add a pull request.


RE: New Gekko features # pull request brainstorming # github.com/mark-sch - Kris191 - 08-01-2018

I like the cli config changes, i find it very time consuming to change candle sizes on backrests each time. i'm sorry but i dont fully understand the second one to comment. Are you adding these to the pull request for your telegram bot (which i'm very excited about)


RE: New Gekko features # pull request brainstorming # github.com/mark-sch - mark.sch - 08-01-2018

Yes good idea. I just added support to specify several --set command line argument, separated by comma. Example:

node gekko --config config-eth.js --set tradingAdvisor.candleSize=5,debug=true

This way you can for example set your candleSize and many other params on the fly. @Mike: It uses string split() commands to determine the args, we could cover it in a regex if things need get more flexible. It works nice if you care not to add any spaces in the --set args. A regex could trim them.

This is covered with commit: https://github.com/mark-sch/gekko/commit/70a4f640ba01a099ae57b7d80b522a6c2a33cbc1


RE: New Gekko features # pull request brainstorming # github.com/mark-sch - Kris191 - 08-01-2018

On another note i have been contemplating the following and whether it is workable within Gekko:

I'm a control freak , hence why i'm excited about using the telegram buy and sell bot. Could the bot be made to sell part of portfolio? I understand in the trader.js you can set the amount of currency used to buy and sell by percentage. Can this be a variable command in the telegram bot? askmike's video clarified Gekko's scope as a trend tracker and i wanted to use it as such.

My ideal situation would be: Gekko identifies a trend set by my strat notifies me as a signal and i then review and choose to enter a trade or not, with the ability to use part of my portfolio rather than all or nothing. i understand i would need multiple cli's and telegram bot but i'm ok with that as i use multiple binance accounts so a centralised place to make trades across multiple accounts would be ideal.

is this something that can be created?


RE: New Gekko features # pull request brainstorming # github.com/mark-sch - mark.sch - 08-01-2018

Quote:I'm a control freak , hence why i'm excited about using the telegram buy and sell bot. Could the bot be made to sell part of portfolio? I understand in the trader.js you can set the amount of currency used to buy and sell by percentage. Can this be a variable command in the telegram bot? askmike's video clarified Gekko's scope as a trend tracker and i wanted to use it as such.

is this something that can be created?


Right now Gekko is placing a sticky order with the amount of 95%. To map this value into the config file is not a big thing but the core does not expose a suitable event a plugin (telegram) could use to adjust and notify about these things during runtime. Implementing s.th. beyond the event system is unclean and I would avoid if possible.

Similar issue here: https://github.com/askmike/gekko/pull/2378
https://gekko.wizb.it/docs/internals/events.html