Gekko Forum
Setting up a Selling Threshold - Printable Version

+- Gekko Forum (https://forum.gekko.wizb.it)
+-- Forum: Trading discussion (https://forum.gekko.wizb.it/forum-1.html)
+--- Forum: Automated Trading (https://forum.gekko.wizb.it/forum-2.html)
+--- Thread: Setting up a Selling Threshold (/thread-57920.html)



Setting up a Selling Threshold - spoons24 - 05-20-2019

I am super new to Gekko and trading in general. Is it possible to program a strategy to sell if a high or low value is reached? For example, if the current price of BTC is 8000, and I want to sell the full amount if it reaches 10,000 or sell the full amount if it drops down to 7,500, can I do that with Gekko? Currently in Coinbase Pro (GDAX) won't let you set two limits on the same coin, you have to split it. If anyone knows, that would be helpful. Thanks!


RE: Setting up a Selling Threshold - krang - 05-24-2019

https://github.com/RJPGriffin/gekko/blob/develop/strategies/indicators/zTrailingStop.js

And you can edit exist strat and add https://gekko.wizb.it/docs/strategies/creating_a_strategy.html#check-function
such as
this.advice({
direction: 'long', // or short
trigger: { // ignored when direction is not "long"
type: 'trailingStop',
trailPercentage: 5
// or:
// trailValue: 100
}
});