'Fail if we\'ve already placed self.max_count orders today.'

def validate(self, asset, amount, portfolio, algo_datetime, algo_current_data):

    algo_date = algo_datetime.date()
    if (self.current_date and (self.current_date != algo_date)):
        self.orders_placed = 0
    self.current_date = algo_date
    if (self.orders_placed >= self.max_count):
        self.handle_violation(asset, amount, algo_datetime)
    self.orders_placed += 1
