def to_csv(self, results, market_pair):
        """Creates the csv to output to the CLI

        Args:
            market_pair (str): Market pair that this message relates to.
            results (dict): The result of the completed analysis to output.

        Returns:
            str: Completed CSV message
        """

        logger.warn('WARNING: CSV output is deprecated and will be removed in a future version')

        output = str()
        for indicator_type in results:
            for indicator in results[indicator_type]:
                for i, analysis in enumerate(results[indicator_type][indicator]):
                    value = str()

                    if indicator_type == 'crossovers':
                        key_signal = '{}_{}'.format(
                            analysis['config']['key_signal'],
                            analysis['config']['key_indicator_index']
                        )

                        key_value = analysis['result'].iloc[-1][key_signal]

                        crossed_signal = '{}_{}'.format(
                            analysis['config']['crossed_signal'],
                            analysis['config']['crossed_indicator_index']
                        )

                        crossed_value = analysis['result'].iloc[-1][crossed_signal]

                        if isinstance(key_value, float):
                            key_value = format(key_value, '.8f')

                        if isinstance(crossed_value, float):
                            crossed_value = format(crossed_value, '.8f')

                        value = '/'.join([key_value, crossed_value])
                    else:
                        for signal in analysis['config']['signal']:
                            value = analysis['result'].iloc[-1][signal]
                            if isinstance(value, float):
                                value = format(value, '.8f')

                    is_hot = str()
                    if 'is_hot' in analysis['result'].iloc[-1]:
                        is_hot = str(analysis['result'].iloc[-1]['is_hot'])

                    is_cold = str()
                    if 'is_cold' in analysis['result'].iloc[-1]:
                        is_cold = str(analysis['result'].iloc[-1]['is_cold'])

                    new_output = ','.join([
                        market_pair,
                        indicator_type,
                        indicator,
                        str(i),
                        value,
                        is_hot,
                        is_cold
                    ])

                    output += '\n{}'.format(new_output)

        return output
Creates the csv to output to the CLI

        Args:
            market_pair (str): Market pair that this message relates to.
            results (dict): The result of the completed analysis to output.

        Returns:
            str: Completed CSV message
        
app/outputs.py