10-23-2018, 07:28 AM (This post was last modified: 10-23-2018, 07:28 AM by Kris191.)
Hi all,
I'm not sure if this is possible or has been created before but can a Gekko Strategy be used to manage a current trade. Crypto exchanges aint the best for risk management and i wondered if you could fire up a bot to execute a sell at a determined price, one for a stoploss and the other for a take profit.
Has anyone any idea on how to make this work? I understand it will be a manual process to add a price into the strat and fire up the bot, but if it can be used as a solid automated risk management bot, this would not only be a counter to coinegy but will be a great tool for traders who like to control the entry and exit but need sleep at some point in the the day.
10-23-2018, 08:24 AM (This post was last modified: 10-23-2018, 08:28 AM by askmike.)
Hey Kris,
It kind of depends in what kind of features you want your "risk manager" to have. But in most cases you don't have to use the full Gekko codebase (that comes with strategy execution, order simulation, backtest engine, etc). But instead you can use the Gekko Broker library:
Right now this is a low level tool, it's not a nice app with a UI and buttons. But you can use that to easily execute orders and watch the markets in realtime. How you would use it is your would program your own risk management tool that would use Gekko Broker to automatically watch and trade on all of Gekko's supported markets.
As a matter of fact I am using Gekko Broker at this very moment to run a number of different trading systems, for example some market making bots. They are managing a significant amount of my crypto for me. The markets are quiet now but they trade around one million $ in volume per month.
Thank you for the response, programming isnt my skillset, whilst Broker looks good i'm looking for a more simpler solution, example below...
I enter a trade either directly on the exchange or via the telegram plugin for Gekko. (manual)
At the time of entry i set off the Gekko script with my predetermined price for Stoploss and take profit. the strat will be on a 1 min candle time frame for Gekko so i minimize slippage etc.
Telegram or Pushbullet notify me if one of them triggers.
I want to use it as a passive stoploss and take profit tool, as most exchanges do not allow you to have a stop loss and a limit order for take profit at the same time. if the strat can trigger when the price is touched or passed then it will do what the exchanges will not allow (for now). granted these will need to be market orders but the theory should work.
I need to figure out the code to tell gekko to sell my position when specific price is hit, current the one i can find have it as a percentage gain or loss, which isnt what i'm looking for.
If I understand you correctly, you want to bypass a threshold for buying and selling dynamically into your strategy, right?
The strategy should then simply check if current candle is above/below threshold then buy/sell?
If you already use the telegram bot, you could also extend it to to emit/bypass params to your strategy. You can use the keyboard or inline keyboard feature from the telegram api for this. See screenshot attached.
10-23-2018, 04:17 PM (This post was last modified: 10-23-2018, 04:31 PM by Kris191.)
Oh wow!!!! that looks like what i want. I do not want Gekko to auto trade for me on entry only on exits will the telegram bot allow this? Correct mark, i just want the bot to trigger a sell once my target prices i have calculated manually. example
Manual buy @ £1000
Gekko sells at either
£1200 Take profit
£950 Stop loss
Notification to me that either of these has happened. I would then kill the bot and repeat when a new opportunity presents itself.
Just looking for further advice on this. looking at the code and toml file, these look like i can use this strat as a trade execution and management process (similar to professional trade submissions where entry target and stop are submitted as one).
Does anyone disagree with this? I'm waiting for a raspberry pi to arrive so i can install and test it out and will feedback. If this works it will prove a functionality that current crypto exchanges do not currently.
Mark, would this strat work with your telegram plugin to provide even more flexibility?
11-07-2018, 03:48 PM (This post was last modified: 11-07-2018, 03:52 PM by Kris191.)
So this works in paper trade, needs a tweak for buying as it will buy below the set number rather than enter at a specific target, but ultimately you have a script that manages risk on trades.
EDIT: there is a range buy which will give better control on entry as 1 min candles will have a range to buy within, setting a static entry may get missed a few times before the buy will trigger.