Ensure that talib never gets called in parallel
This commit is contained in:
parent
b53791fef2
commit
c4ab6c0d8d
@ -174,11 +174,9 @@ class FreqaiExampleHybridStrategy(IStrategy):
|
|||||||
# flake8: noqa: C901
|
# flake8: noqa: C901
|
||||||
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||||
|
|
||||||
# User creates their own custom strat here. Present example is a supertrend
|
|
||||||
# based strategy.
|
|
||||||
|
|
||||||
dataframe = self.freqai.start(dataframe, metadata, self)
|
dataframe = self.freqai.start(dataframe, metadata, self)
|
||||||
|
|
||||||
|
with self.freqai.analysis_lock:
|
||||||
# TA indicators to combine with the Freqai targets
|
# TA indicators to combine with the Freqai targets
|
||||||
# RSI
|
# RSI
|
||||||
dataframe['rsi'] = ta.RSI(dataframe)
|
dataframe['rsi'] = ta.RSI(dataframe)
|
||||||
|
Loading…
Reference in New Issue
Block a user