def add_line_at_date(date, dates):
    """Creates list with 'nan' values except for the date 
    that matches the specified date this date and the next
    date has close values 0, 999999 this will create a nearly
    verticle line to be put on the chart

    Parameters
    ----------
    date : datetime object
        the date to create the verticle line
    dates : list(datetime)
        dates in the chart

    Returns
    -------
    closes : list
        close price list (all nan values except 0, 999999 if date in dates)
    closing_time_exists : boolean
        true if date in dates and 0, 999999 added to closes
    """

    closing_time_exists = False
    skip = False
    closes = []
    for i in range(len(dates)):
        if skip:
            skip = False
            continue
        if dates[i] == date:
            closing_time_exists = True
            closes.extend([0, 999999])
            skip = True
            continue
        closes.append(float('nan'))
    return closes, closing_time_exists