(indicator)
| 145 | df = df.resample(freq, label='right').agg(OHLCV_AGG).dropna() |
| 146 | |
| 147 | def try_mean_first(indicator): |
| 148 | nonlocal freq |
| 149 | resampled = indicator.df.fillna(np.nan).resample(freq, label='right') |
| 150 | try: |
| 151 | return resampled.mean() |
| 152 | except Exception: |
| 153 | return resampled.first() |
| 154 | |
| 155 | indicators = [_Indicator(try_mean_first(i).dropna().reindex(df.index).values.T, |
| 156 | **dict(i._opts, name=i.name, |
no outgoing calls
no test coverage detected