Hi,
I am trying to get the date of the last order execution to determine the price from that date.
I am thinking I can do something like the below.
days_between = day_diff(last_order_date, current_date)
last_order_price = data.history(context.security, 'price', days_between, '1d')[-days_between]