MCPcopy
hub / github.com/CryptoSignal/Crypto-Signal / _get_analysis_result

Method _get_analysis_result

app/behaviour.py:314–337  ·  view source on GitHub ↗

Get the results of performing technical analysis Args: dispatcher (dict): A dictionary of functions for performing TA. indicator (str): The name of the desired indicator. dispatcher_args (dict): A dictionary of arguments to provide the analyser

(self, dispatcher, indicator, dispatcher_args, market_pair)

Source from the content-addressed store, hash-verified

312
313
314 def _get_analysis_result(self, dispatcher, indicator, dispatcher_args, market_pair):
315 """Get the results of performing technical analysis
316
317 Args:
318 dispatcher (dict): A dictionary of functions for performing TA.
319 indicator (str): The name of the desired indicator.
320 dispatcher_args (dict): A dictionary of arguments to provide the analyser
321 market_pair (str): The market pair to analyse
322
323 Returns:
324 pandas.DataFrame: Returns a pandas.DataFrame of results or an empty string.
325 """
326
327 try:
328 results = dispatcher[indicator](**dispatcher_args)
329 except TypeError:
330 self.logger.info(
331 'Invalid type encountered while processing pair %s for indicator %s, skipping',
332 market_pair,
333 indicator
334 )
335 self.logger.info(traceback.format_exc())
336 results = str()
337 return results

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected