Quote:From kraken api description https://www.kraken.com/help/api I had the ordertype=market in mind to go the market taker way.
Most people do, the problem is that this is an order type that will always buy (or sell), regardless of liquidity. In liquid markets this is fine but I don't want to design Gekko so it works fine in liquid markets and people can lose all their money in iliquid markets.
Quote:maybe add a new param to the advice, e.g. setTakerLimit=2 to calculate a price limit of -2% against to topmost orderbook price?
Exactly!
Quote:In this case you could decide in the strategy advice how much market taking you want...
I still think that in 90% of the scenarios you will pay more with orders that execute at market, since there are 3 extra costs involved:
- paying taker fees (depends on exchange)
- crossing the spread
- market slippage
As such this needs to be configurable and won't be default. But yes, it should be configurable from within the strategy. I'm thinking of something similar to the passing the trigger object when calling "this.advice". RIght now you pass:
Code:
this.advice({
direction: 'long' // or short
trigger: { // ignored when direction is not "long"
type: 'trailingStop',
trailPercentage: 5
// or:
// trailValue: 100
}
});
I propose we change this direction string to an object where the strategy can indicate market taking a certain %.
Quote:do you think it will work with this price limit adjustment out of the box?
It won't, this requires some changes to Gekko and to Gekko Broker. Right now Gekko Broker never crosses the spread here: https://github.com/askmike/gekko/blob/99...s#L90-L135
EDIT: I actually see now this behaviour was added to Gekko Broker (I was using that in other private projects), but needs to be reworked to work better with Gekko.