Use negative numbers for the rows before the current row in rowsBetween. It's NULL because there are no rows between start=5 end end=0
window = Window.orderBy("new_datetime").rowsBetween(-5, Window.currentRow)