I have the data.table as follows
structure(list(x = c(NA, NA, NA, NA, NA, NA, NA, 0.924528301886792, -0.477326968973745, 0), ema = c(-0.121833534531943, -0.1