05. Multi-Timeframe Strategy
self.primary_df_w = self.primary_df.fillna(0).resample('W-FRI').agg({'open': 'first',
'high': 'max',
'low': 'min',
'close': 'last',
'volume': 'sum'
}).ffill(axis=0).replace(to_replace=0,
method='ffill')self.primary_df_w['RSI_W'] = rsi(
close=self.primary_df_w['close'], window=14)
column_names = ['RSI_W']
self.primary_df_w = self.primary_df_w.reindex(columns=column_names)
Last updated