# Path: nowtrade/logger.py
# CRITICAL = logging.CRITICAL
# ERROR = logging.ERROR
# WARNING = logging.WARNING
# INFO = logging.INFO
# DEBUG = logging.DEBUG
# class Logger(object):
#     def __init__(self, name, log_file=configuration.LOG_FILE, \
#                  console_lvl=configuration.LOGGING_DEFAULT_CONSOLE, \
#                  file_lvl=configuration.LOGGING_DEFAULT_FILE):
#     def get_logger_level(self, name, default, out):
#     def get_console_level(self, name, default):
#     def get_file_level(self, name, default):
#     def set_file_level(self, lvl):
#     def set_console_level(self, lvl):
#     def debug(self, message):
#     def info(self, message):
#     def warning(self, message):
#     def error(self, message):
#     def critical(self, message):
#     def exception(self, message):
#     def __getstate__(self):
#     def __setstate__(self, data):


import uuid
import numpy as np
import talib
import pandas as pd
from nowtrade import logger

class STOCH(TechnicalIndicator):
    """
    The stochastic technical indicator.

    Need to supply the symbol, not the symbol data (example: msft, not msft.close).
    """
    def __init__(self, symbol, fast_k_period=5, slow_k_period=3,
                 slow_k_ma_type=talib.MA_Type.SMA, slow_d_period=3,
                 slow_d_ma_type=talib.MA_Type.SMA):
        TechnicalIndicator.__init__(self)
        self.symbol = str(symbol).upper()
        self.fast_k_period = fast_k_period
        self.slow_k_period = slow_k_period
        self.slow_k_ma_type = slow_k_ma_type
        self.slow_d_period = slow_d_period
        self.slow_d_ma_type = slow_d_ma_type
        self.value = 'STOCH_K_%s_%s_%s_%s_%s_%s' %(self.symbol,
                                                   fast_k_period,
                                                   slow_k_period,
                                                   slow_k_ma_type,
                                                   slow_d_period,
                                                   slow_d_ma_type)
        self.slowk = self.value
        self.slowd = 'STOCH_D_%s_%s_%s_%s_%s_%s' %(self.symbol,
                                                   fast_k_period,
                                                   slow_k_period,
                                                   slow_k_ma_type,
                                                   slow_d_period,
                                                   slow_d_ma_type)

# Path: nowtrade/logger.py
# CRITICAL = logging.CRITICAL
# ERROR = logging.ERROR
# WARNING = logging.WARNING
# INFO = logging.INFO
# DEBUG = logging.DEBUG
# class Logger(object):
#     def __init__(self, name, log_file=configuration.LOG_FILE, \
#                  console_lvl=configuration.LOGGING_DEFAULT_CONSOLE, \
#                  file_lvl=configuration.LOGGING_DEFAULT_FILE):
#     def get_logger_level(self, name, default, out):
#     def get_console_level(self, name, default):
#     def get_file_level(self, name, default):
#     def set_file_level(self, lvl):
#     def set_console_level(self, lvl):
#     def debug(self, message):
#     def info(self, message):
#     def warning(self, message):
#     def error(self, message):
#     def critical(self, message):
#     def exception(self, message):
#     def __getstate__(self):
#     def __setstate__(self, data):


# Path: nowtrade/technical_indicator.py
import uuid
import numpy as np
import talib
import pandas as pd
from nowtrade import logger


class STOCH(TechnicalIndicator):
    """
    The stochastic technical indicator.

    Need to supply the symbol, not the symbol data (example: msft, not msft.close).
    """
    def __init__(self, symbol, fast_k_period=5, slow_k_period=3,
                 slow_k_ma_type=talib.MA_Type.SMA, slow_d_period=3,
                 slow_d_ma_type=talib.MA_Type.SMA):
        TechnicalIndicator.__init__(self)
        self.symbol = str(symbol).upper()
        self.fast_k_period = fast_k_period
        self.slow_k_period = slow_k_period
        self.slow_k_ma_type = slow_k_ma_type
        self.slow_d_period = slow_d_period
        self.slow_d_ma_type = slow_d_ma_type
        self.value = 'STOCH_K_%s_%s_%s_%s_%s_%s' %(self.symbol,
                                                   fast_k_period,
                                                   slow_k_period,
                                                   slow_k_ma_type,
                                                   slow_d_period,
                                                   slow_d_ma_type)
        self.slowk = self.value
        self.slowd = 'STOCH_D_%s_%s_%s_%s_%s_%s' %(self.symbol,
                                                   fast_k_period,
                                                   slow_k_period,
                                                   slow_k_ma_type,
                                                   slow_d_period,
                                                   slow_d_ma_type)

        self.logger.info('Initialized - %s' %self)