Stop Loss Placement Issue in Strategy #1123
Unanswered
crueltytanya
asked this question in
Q&A
Replies: 1 comment
-
Check if you have You may also find this - https://github.com/s-kust/python-backtesting-template/blob/main/utils/strategy_exec/stop_loss.py - helpful |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm experiencing difficulty with setting up SL (Stop Loss). I set the price for SL as follows: for LONG positions, it's the low price of the previous candle, and for SHORT positions, it's the high price of the previous candle. However, in the majority of cases, the SL works correctly, but for 35% of the trades with SL, the value is incorrect, and it's skewing the performance metrics of the strategy. Could you please advise on what might be the issue?
my code:
self.buy(sl=self.data.Low[-1]) self.sell(sl=self.data.High[-1])
Beta Was this translation helpful? Give feedback.
All reactions