I'm having some issues implementing a trailing stop. Basically I am trying to do something like this:
# place stoplimit order for apple
order(context.aapl, amount, style=StopLimitOrder(limit_price, stop_price))
# Get My Open Order for apple
open_aapl_orders = get_open_orders(context.aapl)
# Adjust my stop limit based on the new price of apple (psuedo code is below)
if data.current(context.appl, 'price') > "Existing Stop_Price on my order":
Cancel order and place a new one
Basically just trying to figure out what code I need to use to get the existing stop price in my open order so I can compare it against the current price of apple. Is there a way to pull the stop price I set in my open order out of "open_appl_orders"?.....Any suggestions would be much appreciated.