def find_order_relative_levels(price_ranges, order_probabilities):
    """Calculates orders relative levels with given filling probability depending on historical market volatility

    :param (list of float) price_ranges: historical price ranges (required)
    :param (list of float) order_probabilities: order filling probabilities (required)
    :return (list of float) order_levels: relative levels of orders
    """

    probability_step = 1 / len(price_ranges)
    order_levels = []
    for fill_probability in order_probabilities:
        if fill_probability < probability_step:
            order_levels.append(0)
            continue
        range_index = len(price_ranges) - fill_probability / probability_step
        range_index_int_part = int(range_index)
        range_index_double_part = range_index - range_index_int_part
        level = price_ranges[range_index_int_part] + (price_ranges[range_index_int_part + 1] -
                                                      price_ranges[range_index_int_part]) * range_index_double_part
        order_levels.append(level)
    return order_levels