Cannot order or filter by moving average


I am using elasticsearch 7+ version and I need to understand if is possible to order the values by moving average in order to group the top 10, or if somehow I can remove the lines in my moving average that does not meet certain threshold.
For example : remove all the lines that do not reach 80% in my moving average predictions.