Hello All!

   I am trying to issue a bracketed sell order, I am submitting the order with a negative quantity, however the order is executing a BUY, not a SELL. What am I doing wrong? Thanks in advance!

def TakeProfit(self, symbol, stop_loss, price):
       self.CloseOpenOrders(symbol)
       quantity = round((self.shares[symbol] *.25) * -1, 0)
       shares_remaining = self.shares[symbol] + quantity
       self.StopLimitOrder(symbol, quantity, stop_loss, price)
       self.StopMarketOrder(symbol, shares_remaining, stop_loss)
       self.shares[symbol] = shares_remaining
       self.stop_loss[symbol] = stop_loss
       return