Dave-Vallance / bt-ccxt-store

Fork of Ed Bartosh's CCXT Store Work
MIT License
422 stars 185 forks source link

Question: BrokerCls and DataCls #20

Closed obiben closed 4 years ago

obiben commented 4 years ago

In ccxtstore.py, there's comments saying DataCls and BrokerCls will auto register. How does that happen? I've tried implementing a basic exchange to use my own data and eventually backtest executions using current bid/ask on Canadian markets.

I've edited ccxtstore.py with this addition:

from jack import jack
ccxt.jack = jack
ccxt.exchanges.append('jack')

Where jack is my exchange.

However whenever I call store.getbroker() or store.getdata(), I get a TypeError: 'NoneType' object is not callable where DataCls and BrokerCls are None.

Would you happen to have a clear idea what I'm doing wrong?

obiben commented 4 years ago

As per usual, the answer came to me a few minutes after deciding to ask questions. Since I hadn't installed the package and wasn't going through the init file, I needed to import everything on my own.