Note: for support questions, please join our Discord server
I'm submitting a ...
[ ] bug report
[x] feature request
[ ] question about the decisions made in the repository
Action taken (what you did)
First of all thanks for all the work you've done on this, it looks great. I have been trying to wrap my head around gekko, and the short and long interface just does not match my expectations, or seem to give me enough control.
Expected result (what you hoped would happen)
I wanted the interface to be more like GDAX node, which gives me complete control.
// Buy 1 BTC @ 100 USD
const buyParams = {
'price': '100.00', // USD
'size': '1', // BTC
'product_id': 'BTC-USD',
};
authedClient.buy(buyParams, callback);
// Sell 1 BTC @ 110 USD
const sellParams = {
'price': '110.00', // USD
'size': '1', // BTC
'product_id': 'BTC-USD',
};
authedClient.sell(sellParams, callback);
With only short and long controls I cannot implement the strategy I would like. For example, I want to buy when the price is low, and if it goes lower, I want to buy even more. I really wanted to use gekko because it has a great interface and backtesting feature, so very nice work on that front!
This was also my first observation when starting to use Gekko, is that the long() and short() methods don't allow any parameters to them. As the simplest implantation of an upgrade to this, I would propose a float parameter to define the amount to buy or sell as a fraction of existing assets. For example:
long(0.25)
This would enter long position with 25% of what is available.
short(0.5)
This would trade back 50% of the asset.
Agreed ^ this would allow a lot of freedom long(0.5)
I would like see this feature too. Furthermore, it would be great if the advice can also take a second parameter, which is the limit price for the order.
Referencing similar issue.
I'm surprised that this library doesn't have fine grained position management. It's just crazy lol.
Gekko is aimed to completely seperate alpha from portfolio management and execution logic. This only works when you are trading long term (since you are trying to make percentages, not basepoints). Besides coding up an interface between the strat and the execution engine a problem is communicating portfolio management to the end user. Read the discussion here for more details: #2173
You'll have to build a new system, if you want something like this. In my experience execution heavy strategies also require more realtime market data (like order flow and trade flow, instead of just candles). If you do you need to throw away 80% of Gekko. If you want to go for this I'd recommend to use the Gekko Broker module of this project as the execution layer.
I'm surprised that this library doesn't have fine grained position management. It's just crazy lol.
Nope, it's just out of scope, read this page: https://gekko.wizb.it/docs/introduction/scope.html
Most helpful comment
This was also my first observation when starting to use Gekko, is that the
long()andshort()methods don't allow any parameters to them. As the simplest implantation of an upgrade to this, I would propose a float parameter to define the amount to buy or sell as a fraction of existing assets. For example:long(0.25)This would enter long position with 25% of what is available.
short(0.5)This would trade back 50% of the asset.