vectorbt
vectorbt copied to clipboard
Unable to move stop-loss in profit
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 Hi, did you ever resolve this? It would be of help to me. thx.