Hi,
I am creating an algo which rebalances weekly on a Monday. When i enter orders either short or long i use the following syntax
order_target_percent(stock, weight,style=StopOrder(stop_price = current_price+stop_price)). I check the order is correctly entered with a good value for the stop and it looks correct. I have a function i call daily to log the current prices of the portfolio positions and I can see that the stops haven't worked. For instance if I enter a short position and the current price is 5 and I put a stop loss of 6 in, I can see the price on subsequent days exceed this threshold. So what is happening ? Does the order_target_percent stop only hold for the day i enter it and it's cancelled at the end of the session ? I was hoping the stop information would be passed with the order and be held for the lifetime of that position.
Many thanks for help.
e.