wolf icon indicating copy to clipboard operation
wolf copied to clipboard

several orders at once and stop loss

Open pipinoloco opened this issue 7 years ago • 10 comments

hi, a cool feature could be a stop loss trigger, example wolf buys at 0.10 and if the price moves 5% below that price it will trigger a stop loss, if not sell at the given percentage. Another cool feature could be to manage several orders at once:

  1. Total balance example 1 ether. 10 orders max.
  2. Order 1, buys at market and sell at percentage or stop loss.
  3. Order 2, put a limit order at -1% and sell at percentage or stop loss. 3 to 10 etc.

it can be done or you will be spamming the order book? wolf will be managing here 10 orders at queue without waiting to the 1st order to be filled like it is working now, the market price is the key for making the 2nd, 3rd, 4th, etc order.

you could be managing 10 orders at once, in the same market and then selling according to a percentage (example 1%) or trigger a stop loss.

pipinoloco avatar Feb 04 '18 13:02 pipinoloco

Love it, this will most definitely be a feature in the next major version release!

austinyearlykim avatar Feb 07 '18 16:02 austinyearlykim

to neve lose money, when the market is bull the bot will attempt to close the order at the given percentage of market order but if the market falls the bot will close the position on the initial price.

EXAMPLE, you bought 1000 TRX at 0.02 ETH

if the price rise to 0.021 we are in the money so the bot can close the position on profit without waiting to reach target profit of 1%, it can ask the user if it closes the position or do it automatically.

If the position is closed, it waits until the initial price appears or better, example 0.0189. when that price is reached it buys again.

we have there an initial order, one was filled, it stopped at 0.021 and rebought at 0.0189 bot made money when the market was up and down.

if the price falls a lot, we can have a stop loss here.

pipinoloco avatar Feb 07 '18 20:02 pipinoloco

I did a refactor at v3.0.0 and just did a feature release and we're at v3.1.0 now: https://github.com/austinyearlykim/wolf/commit/253d167fdbac857230ef2c644e8e483cc1ac62a0

Looking to start managing multiple orders at once soon. A lot of refactoring was done to make managing multiple orders as readable as possible 👍

austinyearlykim avatar Feb 25 '18 01:02 austinyearlykim

i was testing last week your last version and it worked great, but suddenly i have seen the bot stopped working randomly after making some buy/sell orders, i will test it this week and i let you know any glitch, keep up the good work!

pipinoloco avatar Feb 25 '18 16:02 pipinoloco

best feature could be also to cancel a pending BUY or SELL order if not filled in xxxx seconds, that can be good to adjust the current profit percentage to the current market price, you know the price moves too fast down or up and if you have a pending BUY order and the market goes fastly up or down that order won-t be filled.

pipinoloco avatar Feb 25 '18 16:02 pipinoloco

The concept of cancelling an order based on X seconds is something i'm trying to implement right now too. I would rather have W.O.L.F be a little smarter than an arbitrary amount of seconds, but who knows, that might actually have a lot more merit than i currently think it does. Gonna think on this implementation a bit more.

https://www.investopedia.com/articles/active-trading/101014/basics-algorithmic-trading-concepts-and-examples.asp

austinyearlykim avatar Feb 26 '18 03:02 austinyearlykim

even Binance is not so volatile than Bitmex.com, you could check Bitmex.com as inspiration for WOLF. Bitmex moves the price a lot (the spread i mean), WOLF would be cool to have some kind of "spread intelligence" so it can "learn" when to close an order and when to open it. The problem with fixed spread is that once you have a position opened, if the price moves against you, you cannot close that order, you would need then a stop loss or creating a new buy order with the lower price to match the spread.

pipinoloco avatar Feb 26 '18 06:02 pipinoloco

Just for visibility i'm still thinking on this implementation. I'll have time to start the branch on this coming Sunday. I'm looking at other bots and choosing what seems to be most popular and/or optimal

austinyearlykim avatar Mar 13 '18 19:03 austinyearlykim

hi pal, go for dynamic spread, try to buy and sell at NOT a fixed spread so the bot can buy at 1000 for example and sell at 1010 or sell at 1050, working with FIXED spread is very bad in the cryptospace as the price goes down and up very often. So the bot can "sell" at better price if it isnt working with fixed spread and also can "buy" at better price. WIth fixed spread when the price is gone, you can wait weeks until the price reachs the spread price.

pipinoloco avatar Mar 14 '18 20:03 pipinoloco

Dynamic/Stop-loss orders incoming, needs testing on my end before I make it public.

austinyearlykim avatar Mar 25 '18 23:03 austinyearlykim