def check_gaps(df):
    """
    Checks for gaps wider than x pips.
    Doesn't take sunday gaps into consideration.
    
    :x reference amount of pips to measure the gap size that will be selected
    :df dataframe consisting of any kind of candles
    :return dataframe containing candles that opened with a gap of x in relation to previous candle
    :rtype dataframe
    """
    df['oldIndex'] = df.index
    df['oldIndex'] = df['oldIndex'].shift(1)
    df['oldClose'] = df['close'].shift(1)
    df['gap'] = (df['open'] - df['oldClose']) * [10000]
    df = df.loc[(df['gap'] > 10) & (df.index.year > 2004) & (df.index.
        weekday != 6)]
    return df
