Trade Risk Management Strat
#1
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.

NOTE: this strat doesnt require a buy option.

Thanks

Kris
  Reply
#2
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.

EDIT: Here is the link to some documentation: https://gekko.wizb.it/docs/gekko-broker/...ction.html
  Reply
#3
Hi Mike,

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.
  Reply
#4
I was having a quick search and found these, does anyone think this strat could be modified to do what i want??


https://github.com/xFFFFF/Gekko-Strategi...topLoss.js
https://github.com/xFFFFF/Gekko-Strategi...pLoss.toml
  Reply
#5
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.


Attached Files
.jpg   PSX_20181023_181407.jpg (Size: 154.64 KB / Downloads: 23)
  Reply
#6
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.
  Reply
#7
Hi Again,

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?

Thanks

Kris
  Reply
#8
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.
  Reply


Forum Jump:


Users browsing this thread: