ta icon indicating copy to clipboard operation
ta copied to clipboard

Trix indicator fillna value is wrong

Open Hokyjack opened this issue 2 years ago • 1 comments

Hello, there is probably an issue with Trix indicator, when used with fillna=True parameter, it fills the missing value with 100, but I believe it should be 0, because then it is extreme value, that is never reached with this indicator. See image bellow: image

Hokyjack avatar Jan 22 '22 01:01 Hokyjack

Hi @Hokyjack ,

Thanks for your message.

TRIXIndicator and all the indicators that use ema internally have the same effect because the nan values are filled by pd.ewm. So let me study a solution for all the cases.

For the moment, try to work filling with the value that you prefer:

ta.trend.TRIXIndicator(all_symbols_preds_train["NEOUSDT"]["df_eval"]["close"], fillna=False).trix().fillna(0)

Best, Dario

bukosabino avatar Jan 27 '22 15:01 bukosabino