Skip to content

Commit

Permalink
updated order creator for real orders limits
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume De Saint Martin authored Jun 1, 2018
1 parent e6014dd commit 035d9ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions evaluator/evaluator_order_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ def create_new_order(self, eval_note, symbol, exchange, trader, portfolio, state
current_price=price,
quantity=order_quantity,
price=order_price)
trader.create_order(limit, portfolio)
created_orders.append(limit)
updated_limit = trader.create_order(limit, portfolio)
created_orders.append(updated_limit)

stop = trader.create_order_instance(order_type=TraderOrderType.STOP_LOSS,
symbol=symbol,
current_price=price,
quantity=order_quantity,
price=stop_price,
linked_to=limit)
linked_to=updated_limit)
trader.create_order(stop, portfolio)
return created_orders

Expand Down

0 comments on commit 035d9ff

Please sign in to comment.