'Restore ticks from the database'

def restore_from_database(self):

    for tick in self.database.get_ticks():
        if ((not self.tick_exists(tick.order_id)) and tick.is_valid()):
            (self.insert_ask(tick) if tick.is_ask() else self.insert_bid(tick))
