added a check for bias1.

Looking at has_bias should be enough to statisfy the test.
The tests could be extended with thecking the buy/sell signals and the dataframe itself -
but this should be sufficient for now.
This commit is contained in:
hippocritical
2023-05-27 20:35:45 +02:00
parent ee37693729
commit a7426755bc
2 changed files with 34 additions and 18 deletions

View File

@@ -29,12 +29,13 @@ class strategy_test_v3_with_lookahead_bias(IStrategy):
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
# bias is introduced here
ichi = ichimoku(dataframe,
conversion_line_period=20,
base_line_periods=60,
laggin_span=120,
displacement=30)
dataframe['chikou_span'] = ichi['chikou_span']
if self.scenario.value != 'no_bias':
ichi = ichimoku(dataframe,
conversion_line_period=20,
base_line_periods=60,
laggin_span=120,
displacement=30)
dataframe['chikou_span'] = ichi['chikou_span']
return dataframe