Skip to content

Commit cf9ff2d

Browse files
committed
Allow config for data context history length
1 parent 7009d33 commit cf9ff2d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pytrade/broker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
class Broker(IBroker):
1414

15-
def __init__(self, client: IClient):
15+
def __init__(self, client: IClient , max_history = 100):
1616
self.client = client
1717
self._orders: List[Order] = []
18-
self._data_context = CandleData(max_size=100)
18+
self._data_context = CandleData(max_size=max_history)
1919
self._subscriptions: list[Tuple[Instrument, Granularity]] = []
2020
self.logger = get_logger()
2121

0 commit comments

Comments
 (0)