vectorbt icon indicating copy to clipboard operation
vectorbt copied to clipboard

Unable to move stop-loss in profit

Open tossha opened this issue 3 years ago • 1 comments

Hi! I'm using Portfolio.from_signals and trying to set up a moving stop-loss using supertrend. So for long position I want my stop-loss to move up with supertrend. I use adjust_sl_func_nb for that and everything works great untill the stop-loss moves in profit. There's a condition in get_stop_price_nb which does not allow to have a stop-loss in profit for some reason. Just for the sake of experiment I commented it out and the strategy worked like a charm. So why is that check in there? And how can I move my SL in profit with adjust_sl_func_nb? Thanks!

tossha avatar Jul 31 '22 22:07 tossha

@tossha Hi, did you ever resolve this? It would be of help to me. thx.

jackRoark avatar Oct 01 '22 08:10 jackRoark