Taranveer,
It’s easy – just thin it through.
(1) Run the exploration and copy paste into excel
(2) In excel, starting from the top, calculate the dollar value for each holding, exactly as I did in that spreadsheet I sent you, i.e. column G.
(3) Work your way down the column until your account balance has been fully used.
Do the same the following month except
(1) do the same calcs down the column
(2) do not adjust existing positions
(3) sell what needs to be sold and buy new positions