Proper stop losses coming soon
#50
Quote:Regarding 1.: It would be great if one could control the triggers for already given advice, I agree. Do you see currently (with 0.6.8) any way for me to tap into that and manipulate for example the percentage of an existing trailing stop loss (maybe even by extending the current Gekko behavior)? Lets say, I initiate always the trailing stop loss for every long advice, so the trigger exists, however start with a large percentage and gradually want to decrease it?

This would be pretty hard, since the trailing stop is managed by a different part of the codebase (inside Gekko Broker). The trailing stop code supports adjusting the trail: https://github.com/askmike/gekko/blob/65...top.js#L38

But that needs to be glued through a few components so your strategy can pass a message there. A message needs to flow from:

- your strategy
- tradingAdvisor plugin
- [ new gekko event ] - see here: https://gekko.wizb.it/docs/internals/events.html
- the trader plugin
- into the trailing stop

If we go this route I want to completely detach the creating of a trailing stop with the triggering of a long signal (we can still support current behavior to keep everything backwards compatible).

Quote:2. Thank you for your explanations. Yes it would be possible for me to use a shorter interval and monitor the price. As I understood the trailing stop loss is using the live price and not the candle updates to trigger the stop. I was aiming for something similar to buy that uses the live price, so is even fast than the candle updates and automatically triggers when the price moves up a specific percentage/value.

Gekko strategy interface is very simple by design, the only lever you have is the candleSize (with a minimum of once per minute). Note that "live trailing stop" that Gekko supports isn't low latency either, it polls pretty slow once every few seconds max: https://github.com/askmike/gekko/blob/de...ger.js#L41

---

Gekko really isn't designed for low latency stuff. I want to move towards native stop losses for exchanges that support them, that doesn't require any effort on Gekkos part.
  Reply


Messages In This Thread
Proper stop losses coming soon - by askmike - 07-07-2018, 07:27 AM
RE: Proper stop losses coming soon - by TCMabe - 07-11-2018, 08:38 PM
RE: Proper stop losses coming soon - by askmike - 07-12-2018, 04:23 AM
RE: Proper stop losses coming soon - by mark.sch - 07-12-2018, 04:41 PM
RE: Proper stop losses coming soon - by askmike - 07-13-2018, 01:36 AM
RE: Proper stop losses coming soon - by mark.sch - 07-13-2018, 09:53 AM
RE: Proper stop losses coming soon - by askmike - 07-13-2018, 12:50 PM
RE: Proper stop losses coming soon - by Kris191 - 07-30-2018, 03:37 PM
RE: Proper stop losses coming soon - by askmike - 07-31-2018, 12:56 PM
RE: Proper stop losses coming soon - by askmike - 08-11-2018, 07:32 AM
RE: Proper stop losses coming soon - by PapoKarlo - 08-12-2018, 10:12 AM
RE: Proper stop losses coming soon - by mark.sch - 08-12-2018, 11:50 AM
RE: Proper stop losses coming soon - by askmike - 08-12-2018, 02:35 PM
RE: Proper stop losses coming soon - by askmike - 08-14-2018, 04:06 AM
RE: Proper stop losses coming soon - by PapoKarlo - 08-14-2018, 04:42 PM
RE: Proper stop losses coming soon - by askmike - 08-14-2018, 04:47 PM
RE: Proper stop losses coming soon - by mark.sch - 08-16-2018, 09:24 AM
RE: Proper stop losses coming soon - by askmike - 08-16-2018, 04:04 PM
RE: Proper stop losses coming soon - by mark.sch - 08-17-2018, 10:26 PM
RE: Proper stop losses coming soon - by askmike - 08-27-2018, 11:49 AM
RE: Proper stop losses coming soon - by askmike - 08-27-2018, 12:27 PM
RE: Proper stop losses coming soon - by mark.sch - 09-06-2018, 11:13 PM
RE: Proper stop losses coming soon - by maxblack - 10-07-2018, 09:46 AM
RE: Proper stop losses coming soon - by mark.sch - 09-03-2018, 12:20 AM
RE: Proper stop losses coming soon - by askmike - 09-03-2018, 04:58 AM
RE: Proper stop losses coming soon - by mark.sch - 09-04-2018, 01:11 PM
RE: Proper stop losses coming soon - by BotsEdge - 09-09-2018, 11:25 PM
RE: Proper stop losses coming soon - by askmike - 09-06-2018, 05:14 AM
RE: Proper stop losses coming soon - by bitsnpcs - 09-11-2018, 11:55 PM
RE: Proper stop losses coming soon - by Presunto - 09-27-2018, 12:43 PM
RE: Proper stop losses coming soon - by askmike - 09-28-2018, 04:16 AM
RE: Proper stop losses coming soon - by askmike - 10-20-2018, 06:14 AM
RE: Proper stop losses coming soon - by askmike - 10-22-2018, 04:26 AM
RE: Proper stop losses coming soon - by askmike - 11-11-2018, 05:01 AM
RE: Proper stop losses coming soon - by askmike - 11-14-2018, 11:15 AM
RE: Proper stop losses coming soon - by askmike - 01-03-2019, 09:05 AM
RE: Proper stop losses coming soon - by askmike - 01-03-2019, 05:28 PM
RE: Proper stop losses coming soon - by hitripley - 01-18-2019, 02:46 PM
RE: Proper stop losses coming soon - by hitripley - 01-18-2019, 03:18 PM

Forum Jump:


Users browsing this thread: