zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

Placing STOP LOSS orders for trailing stop instead of limit sell orders

Open mikeh21 opened this issue 9 years ago • 11 comments

Feature request.

HI just wanted to know if there is a reason why the bot doesnt use the STOP LOSS order function when using trailing stop? this would make it much easier for the bot to sell the top rather than chasing it up with the limit sell orders it is currently using?... can this be easily changed in the exchange scripts?

--profit_stop_enable_pct <pct>  enable trailing sell stop when reaching this % profit
--profit_stop_pct <pct>         maintain a trailing stop this % below the high-water mark of profit

mikeh21 avatar Nov 16 '17 09:11 mikeh21

PS Im referring to GDAX exchange I do not have experience of other exchange but expect the same is possible and would also benefit from this feature

mikeh21 avatar Nov 16 '17 09:11 mikeh21

STOP orders usually have taker fees. It this OK?

nedievas avatar Nov 16 '17 16:11 nedievas

Hi, I know on GDAX can place Stop Loss W/ Limit order which is no fees and can be placed below market price to prevent loss. could this be implemented in zenbot to use trailing stop loss to lock in profit in trending market?

mikeh21 avatar Nov 23 '17 12:11 mikeh21

Same request! Thanks.

manuelpaulo avatar Dec 20 '17 18:12 manuelpaulo

Unfortunately, the API doesn't currently support stop-limit. You can put in a stop order, but it turns into a market order when triggered.

skeebuzz avatar Jan 04 '18 08:01 skeebuzz

@skeebuzz I am interested in this feature as well and based on the discussion here it looks it is possible to place such an order, it is just not documented. I have not tested this myself.

authenticatedClient.sell( {
  type: "limit",
  product_id: "BTC-USD",
  size: "0.005",
  price: "10100",      // the limit price
  stop: "entry",       // currently undocumented
  stop_price: "10000", // currently undocumented
});

shri046 avatar Jan 09 '18 05:01 shri046

@shri046 Oooowwww... thanks for that! Good to know!!

skeebuzz avatar Jan 09 '18 15:01 skeebuzz

Gdax now officially supports them: https://docs.gdax.com/#place-a-new-order

skeebuzz avatar Jan 19 '18 11:01 skeebuzz

@shri046 That's not quite right. For sell side it should be stop: "loss" not "entry". For buy side, it's "entry".

obinnaokechukwu avatar Jan 21 '18 02:01 obinnaokechukwu

This looks a very interesting feature that should solve the slippage problem in live trading where order execution is a big mess and you see limit orders filled after 11 minutes

stop limit order should help trigger price points for strategy.js to act on

yang2lalang avatar Jan 30 '18 12:01 yang2lalang

Correct me if won't please but I thought on gdax if you place a stop loss order for say $50 and then under advanced a limit of $45 then if the market crashes fast and gdax cannot fill as a market order between $45-$50 then it won't sell at all. This avoids leaving you at the very bottom before popping up again. I use to think it execute at a limit order saving you money but I believe that is just an extra precautionary. Please inform me if I'm incorrect.

Either way it would be extremely useful for me if I could enter process to sell and buy irregardless of if it's above or below the current price

kilo42L avatar Sep 23 '18 23:09 kilo42L