Mongodb query syntax

Hi
we do have data in following format

market_id, end_dt, open, high, low, close, previous_close
999,2022-09-23T10:00,11,12,9,10,
999,2022-09-23T10:05,9,11.4,10.42,11,<Populate with value close price from Previous Row which is 10>
999,2022-09-23T10:10, 8,9,7,8.5,<Populate with value close price from Previous Row which is 11>

our index is on market_id & end_dt (end_dt is 5 minutes bar)
what would be syntax to update previous_close on current row from “close” price from previous row

Thanks
Dhruvesh