From 5909db64240b5aeb14e8ac2b2cf3b779bab7bf21 Mon Sep 17 00:00:00 2001 From: Kyle Widmann Date: Thu, 13 Feb 2025 20:39:07 -0500 Subject: [PATCH] Update strategy init order --- pytrade/strategy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pytrade/strategy.py b/pytrade/strategy.py index 3187a08..a40bef6 100644 --- a/pytrade/strategy.py +++ b/pytrade/strategy.py @@ -27,8 +27,9 @@ def __init__(self, broker: IBroker, data_context: IDataContext): def init(self) -> None: self._caluclate_updates() - self._monitor_instruments() + # Call init first incase any indicators preload data for initial signals self._init() + self._monitor_instruments() def _caluclate_updates(self) -> None: self._required_updates: list[CandleSubscription] = []