Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Email advisor extra functions #615

Closed
decoye opened this issue Mar 8, 2017 · 7 comments
Closed

Email advisor extra functions #615

decoye opened this issue Mar 8, 2017 · 7 comments

Comments

@decoye
Copy link
Contributor

decoye commented Mar 8, 2017

Hello,

id like to add ome functions to gekko, but i wonder if people would find them useful.

I think it would be helpful to get info about the current standing on your account with email or message.

and also the achieved profits since gekko is running your strategy.

would this be possible/helpful for someone?

@askmike
Copy link
Owner

askmike commented Mar 8, 2017

I think it would be helpful to get info about the current standing on your account with email or message.

Sounds great! There is a plugin already that will email every new advice. You can take a look at that plugin here and here.

and also the achieved profits since gekko is running your strategy.

So you mean real profits for people using the real trader? Sounds great, that is definitely something that a lot of people requested.


So go ahead! And let me know once you need any help :)

@askmike
Copy link
Owner

askmike commented Mar 8, 2017 via email

@askmike
Copy link
Owner

askmike commented Mar 8, 2017

Standing would be the current amount that your account holds.

This would not be something the tradingAdvisor would know about, the tradingAdvisor just emits advice from a trading method. The trader (which implements a portfolioManager) would pick up this advice and figure out whether we can perform a trade.

If you want to know account balance in a plugin (sounds very reasonable) we should emit an event from the trader like "portfolioUpdate" which other plugins (like an email plugin, or a telegarm plugin) can subscribe to.

How do I access the variable that the trader creates when he calculates to long or short?

What variable do you mean?

@thegamecat
Copy link

This would be very cool indeed.

@thegamecat
Copy link

Decoye, you posted a graph of a backtest on here a while back. How did you build the graph? It would be a really helpful tool for this.

@askmike
Copy link
Owner

askmike commented Mar 9, 2017

@thegamecat

How did you build the graph?

Have a look here: #489.

there must be something in memory that holds my account balance, both fiat and currency.

Ah yes, there is. Though because of how modularized Gekko is this is not accesable by other plugins (like email advisor or telegrambot). As said before:

If you want to know account balance in a plugin (sounds very reasonable) we should emit an event from the trader like "portfolioUpdate" which other plugins (like an email plugin, or a telegarm plugin) can subscribe to.

I'll will update Gekko (ASAP) so that plugins can act on an updated portfolio like so:

processPortfolioUpdate = function(portfolio) {
  // portfolio is an array like
  // [ { name: 'BTC', amount: 5 }, { name: 'USD', amount: 100 } ]
}

(the same as how new candles are now being given to plugins).

@askmike
Copy link
Owner

askmike commented Mar 9, 2017

To come back on your original idea:

I think it would be helpful to get info about the current standing on your account with email or message.

Right now it emails advice from the trading method, which is not very useful if gekko is trading for real (in this case it would be better to email a report of the trade, together with the new portfolio). You could implement this as a setting in the mailer via the config.


I am closing this now, but feel free to ask questions here and open a PR if you have some code.

@askmike askmike closed this as completed Mar 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants