# 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/strategy.py
# class Strategy(object):
#     def __init__(self, dataset, criteria_groups, trading_profile):
#     def __str__(self):
#     def __repr__(self):
#     def simulate(self):
#     def process_new_data(self, data):
#     def get_next_action(self):
#     def _determine_action(self, values):
#     def _get_status(self, symbol):
#     def _create_actions_status_columns(self, data_frame, symbol):
# 
# Path: nowtrade/symbol_list.py
# class SymbolList(object):
# class Symbol(object):
#     def __init__(self, symbols):
#     def get(self, symbol):
#     def __repr__(self):
#     def __str__(self):
#     def __iter__(self):
#     def __init__(self, symbol):
#     def __repr__(self):
#     def __str__(self):
#     def __hash__(self):
#     def __eq__(self, other):
#     def custom(self, name):
# 
# Path: nowtrade/action.py
# LONG = 1
# 
# LONG_EXIT = -1
# 
# SHORT = 2
# 
# SHORT_EXIT = -2


import matplotlib.pyplot as plt
import pandas as pd
from matplotlib.finance import candlestick_ochl
from matplotlib.dates import date2num
from nowtrade import logger
from nowtrade import strategy
from nowtrade import symbol_list
from nowtrade.action import LONG, LONG_EXIT, SHORT, SHORT_EXIT
"""
This module provides an abstraction layer over matplotlib's plotting
functionality.  It focuses on easily plotting charts of your strategy's
performance and technical indicators.
"""

TI = 0 # Technical Indicator
TYPE = 1 # Chart type - line, bar, etc
COLOR = 2 # TI Color

class Figure(object):
    """
    @param dataset: A Dataset or Strategy object.
    """
    def __init__(self, dataset, rows=1, grid=True):
        # We need to handle a strategy being passed
        if isinstance(dataset, strategy.Strategy):
            self.strategy = dataset

# 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/strategy.py
# class Strategy(object):
#     def __init__(self, dataset, criteria_groups, trading_profile):
#     def __str__(self):
#     def __repr__(self):
#     def simulate(self):
#     def process_new_data(self, data):
#     def get_next_action(self):
#     def _determine_action(self, values):
#     def _get_status(self, symbol):
#     def _create_actions_status_columns(self, data_frame, symbol):
# 
# Path: nowtrade/symbol_list.py
# class SymbolList(object):
# class Symbol(object):
#     def __init__(self, symbols):
#     def get(self, symbol):
#     def __repr__(self):
#     def __str__(self):
#     def __iter__(self):
#     def __init__(self, symbol):
#     def __repr__(self):
#     def __str__(self):
#     def __hash__(self):
#     def __eq__(self, other):
#     def custom(self, name):
# 
# Path: nowtrade/action.py
# LONG = 1
# 
# LONG_EXIT = -1
# 
# SHORT = 2
# 
# SHORT_EXIT = -2


# Path: nowtrade/figures.py
import matplotlib.pyplot as plt
import pandas as pd
from matplotlib.finance import candlestick_ochl
from matplotlib.dates import date2num
from nowtrade import logger
from nowtrade import strategy
from nowtrade import symbol_list
from nowtrade.action import LONG, LONG_EXIT, SHORT, SHORT_EXIT

"""
This module provides an abstraction layer over matplotlib's plotting
functionality.  It focuses on easily plotting charts of your strategy's
performance and technical indicators.
"""

TI = 0 # Technical Indicator
TYPE = 1 # Chart type - line, bar, etc
COLOR = 2 # TI Color

class Figure(object):
    """
    @param dataset: A Dataset or Strategy object.
    """
    def __init__(self, dataset, rows=1, grid=True):
        # We need to handle a strategy being passed
        if isinstance(dataset, strategy.Strategy):
            self.strategy = dataset

            self.data_frame = self.strategy.dataset.data_frame