def checkMovingWindow(alg, parameters, context, outputTxt=False):
    """ Verify if we have the right parameters """
    configTxt = alg.parameterAsString(parameters, 'config_txt', context)
    config = alg.parameterAsString(parameters, 'config', context)
    if configTxt and config:
        return False, alg.tr("You need to set either inline configuration or a configuration file!")

    # Verify that configuration is in moving window
    movingWindow = False
    if configTxt:
        if 'MOVINGWINDOW' in configTxt:
            movingWindow = True

    # Read config file:
    if config:
        with open(config) as f:
            for line in f:
                if 'MOVINGWINDOW' in line:
                    movingWindow = True

    if not movingWindow and not outputTxt:
        return False, alg.tr('Your configuration needs to be a "moving window" configuration!')

    if movingWindow and outputTxt:
        return False, alg.tr('Your configuration needs to be a non "moving window" configuration!')

    return True, None