s it right that agent in tensortrade can only hold one order one time? and how it…
- User
s it right that agent in tensortrade can only hold one order one time? and how it confirms that the previous order has close so that it can open a new order?
Assistant
Yes, a TensorTrade agent is only able to hold a single order at a time. When the agent wishes to place a new order, it first must confirm that the previous order has been fully executed. This is done by checking the status of the previous order and verifying that it has been closed. Once the agent has confirmed that the previous order has been closed, it can place a new order.
- User
example with code
Assistant
Here’s an example:
if (agent.currentOrder.status == OrderStatus.Closed) { // Place new order }
- User
one more
Assistant
Sure, here's another example:
if (agent.currentOrder.status == OrderStatus.Open) { // Do nothing } else if (agent.currentOrder.status == OrderStatus.Filled) { // Place new order } else if (agent.currentOrder.status == OrderStatus.Cancelled) { // Place new order } else if (agent.currentOrder.status == OrderStatus.Expired) { // Place new order } else if (agent.currentOrder.status == OrderStatus.Rejected) { // Place new order } else if (agent.currentOrder.status == OrderStatus.Failed) { // Place new order } else if (agent.currentOrder.status == OrderStatus.Unknown) { // Place new order }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.