INNER CODE UNIT · Python

__init__

WISEPLAT/backtrader_moexalgo · DataExamplesMoexAlgo/02 - Symbol data to DF.py:15

    def __init__(self):
        self.df = {}
        self.df_tf = {}

    def start(self):
        for data in self.datas:  # Running through all the requested tickers
            ticker = data._name
            self.df[ticker] = []
            self.df_tf[ticker] = store.get_interval(data._timeframe, data._compression)

    def next(self):
        """Arrival of a new ticker bar"""
        for data in self.datas:  # Running through all the requested tickers
            ticker = data._name
            _date = bt.num2date(data.datetime[0])

            try:
                if data.p.supercandles[ticker][data.p.metric_name]:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…