place buy order

def __placeBuyOrder(self, tick):
        ''' place buy order'''
        cash=self.__getCashToBuyStock()
        if cash == 0:
            return

        share=math.floor(cash / float(tick.close))
        buyOrder=Order(accountId=self.__strategy.accountId,
                                  action=Action.BUY,
                                  is_market=True,
                                  security=self.__security,
                                  share=share)
        if self.__strategy.placeOrder(buyOrder):
            self.__buyOrder=buyOrder

            # place stop order
            stopOrder=Order(accountId=self.__strategy.accountId,
                          action=Action.SELL,
                          is_stop=True,
                          security=self.__security,
                          price=tick.close * 0.95,
                          share=0 - share)
            self.__placeStopOrder(stopOrder)