You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where before should be my standard list of open orders and after should be empty if I only have one active order. While this exists for pending orders, I don't see how I can deliberately close a done order in Blankly. I can open a sell position and by default, reduce the amount of money I have in an instrument, but those two things aren't the same. One can think of opening a buy and sell position simultaneously. Not saying it is a great idea, but it is surely something I should be able to do in a backtesting framework. Is this already possible within blankly?
The text was updated successfully, but these errors were encountered:
Hey there, we're trying to mimic live trading as much as possible in the framework. On many exchanges recent finished orders come back as "done" so when you do a get all orders you'll see them sitting in the array.
You may also want to use get_orders() in the API over the interface attribute because I think there's a bit of preprocessing that might help filter in the function call.
Hi, thanks for the reply. My issue was that there is (as far as I could see), no method for closing done orders. If i put in a buy order it will come back done and I own the instrument. Then I want to make a sell order to also have short position on the same instrument. Now I want to close the buy position but leave the short open or some combination. I don't see how I can do that from the blankly API. The close method was only applicable for pending orders and not for done orders. Maybe am just missing something simple, but I don't see how one can do this.
I want to be able to close an order by an id, something like this:
Where before should be my standard list of open orders and after should be empty if I only have one active order. While this exists for pending orders, I don't see how I can deliberately close a
done
order in Blankly. I can open a sell position and by default, reduce the amount of money I have in an instrument, but those two things aren't the same. One can think of opening a buy and sell position simultaneously. Not saying it is a great idea, but it is surely something I should be able to do in a backtesting framework. Is this already possible within blankly?The text was updated successfully, but these errors were encountered: