def to_mtcsv(data, path=None, decimals=5):
    """
    Save a downloaded ticks dataframe as a csv with a optimized format to be
    imported by MetaTrader.
    :param data: pandas dataframe with Ask and Bid columns
    :param path: file path to save
    :param decimals: number of decimals to save
    :return: str if path is None
    """
    csv = data[['Ask', 'Bid']].to_csv(path, header=False,
                                      float_format='%.{}f'.format(decimals))
    return csv