# Exiting bracket trade/order

**URL:** <https://forum.alpaca.markets/t/exiting-bracket-trade-order/4268>\
**Category:** Alpaca Trading\
**Created:** [February 4, 2021, 9:09am UTC](https://forum.alpaca.markets/t/exiting-bracket-trade-order/4268 "2021-02-04T09:09:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matis\_Rei](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/matis_rei/32/1992_2.png) [@Matis\_Rei](https://forum.alpaca.markets/u/Matis_Rei)\
**Post date:** [February 4, 2021, 9:09am UTC](https://forum.alpaca.markets/t/exiting-bracket-trade-order/4268/1 "2021-02-04T09:09:49Z")

</div>

Hey!

Im currently using alpaca with simple API market orders - my tradingview algorithm is using closing prices for entries and exits (and the algo has a stop loss, but it only triggers after the candle is closed).  
Sometimes price falls fast and i’d need to set up a stop loss to Alpaca side to prevent some losses getting out of hand.

Once i set up the bracket BUY order it is buying and stop loss is in place, but when my algo sends a Market or Limit SELL signal (to take profit on specific price for example) - Alpaca will not exit my position.

So to keep this short: is there a simple order how to exit a bracket position?

---

<div class="post-metadata">

**Author:** ![babayking](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@babayking](https://forum.alpaca.markets/u/babayking)\
**Post date:** [February 4, 2021, 6:06pm UTC](https://forum.alpaca.markets/t/exiting-bracket-trade-order/4268/2 "2021-02-04T18:06:02Z")

</div>

you can probably use api.cancel\_order() to cancel the pending portion of the bracket order.
