Suggestions for code to audit position weights over time?

I've got an ETF strategy that holds no more than 5 positions and I'm trying to figure out a way to record the actual position weights over time so I can see if the rebalance code is working. Does anyone have some guidance or example code I could use as a place to start? I could use Exploration to export weekly returns for each ETF and then estimate the position sizes based on my entry date but I was hoping there might be a better way.

Many thanks for the assistance.

You can use custom back tester. For every bar iterate thru open positions and write actual size of each position on by bar bar basis.
Or not export detailed log (built in) that actually shows position sizes every bar.