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
{{ message }}
This repository was archived by the owner on Mar 23, 2022. It is now read-only.
I want to submit a bracket order with a take_profit and a trailing_stop percent. I could not find an option for trailing stop under bracket order. I was trying to use the combination of below 3 orders as a workaround. Could someone help me to validate the below orders or a standard bracket order with trailing stop if that’s possible at all!
buy_order = api.submit_order(
symbol = ticker,
qty = qty,
side = 'buy',
type = 'market',
time_in_force = 'day',
client_order_id = order_id,
)
api.submit_order(
symbol = ticker,
qty = qty,
side = 'sell',
type = 'trailing_stop',
trail_percent = 1,
time_in_force = 'day',
order_class = 'oco',
client_order_id = order_id+1
)
api.submit_order(
symbol = ticker,
qty = qty,
side = 'sell',
type = 'limit',
take_profit = {'limit_price': symbol_price * 1.05},
time_in_force = 'day',
order_class = 'oco',
client_order_id = order_id+2
)
The text was updated successfully, but these errors were encountered:
I want to submit a bracket order with a take_profit and a trailing_stop percent. I could not find an option for trailing stop under bracket order. I was trying to use the combination of below 3 orders as a workaround. Could someone help me to validate the below orders or a standard bracket order with trailing stop if that’s possible at all!
The text was updated successfully, but these errors were encountered: