-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Added ability to execute shell commands on advice #100
Conversation
… the executor framework.
Thanks for your addition. It would be handy if you could add a sample usage (to the docs for example) for example how to use this in combination with pushbullet. Right now I am rewriting the whole of Gekko's core which means all internal APIs are going to change and this will probably break. (Unfortunately it is not yet clear how the internal API design will look like). Last thing: I totally think everyone should be credited for their work and I really don't like that my donation address is the only one there right now while others are contributing as well. But adding 20 lines of code and adding your donation address to the README is not fair for all the people who contributed more than that. To get an idea of contributions by everyone, take a look at the commit history of the dev branch. So at this moment I will not merge this in. |
Mike, As for the internal API changes, I took a brief look and it should be trivial to add my changes to the localDB branch code. I will switch to that branch and submit the changes when I make my changes. |
Awesome thanks! I do agree that there should be an explanation in the README that explains the functionality without hooking it up to any specific third party. But right now I really don't know where to begin if I want to plug it into something like pushbullet. And about the localDB branch: the advice information was being routed straight from a consulter (trading method) into everything interested inside |
@zerodivide1 I have implemented the draft system I was talking about. It's stable enough that if the API changes, I will update the actors myself. Here you can see an implementation which logs to stdout and here you can see what is being expected of only advice actors. So basically you only have to create an object with the method |
Thanks, I'll take a look at it. What are the options for the "advice" argument? Am I correct in assuming that "short" and "long" are the new options instead of "BUY" and "SELL"? |
Yes, short = sell & long = buy. The parameter of portfolio is to indicate how much of the portfolio should take this positition (always 1.0 or 100% now). |
I did change it a little, now you can read all the information you need in the doc! |
Added simple framework to execute arbitrary command-line commands on any new advice. This can allow for arbitrary functionality to be 'plugged-into' Gekko without having to code it into the application.
For example, this can be used to invoke a notification service like Pushbullet so that advice can be delivered as push messages to Android devices instead of through mail. This can also be used to replace the built-in mail framework so that Google accounts are not necessary to send emails.