Question about asset allocation and securities account

Let’s say I have asset class a and b set as 50% of the portfolio each. in asset class a i have 2 stocks split between 2 registered accounts and further split into respective currency. IE. one tax free registered (tfsa/rrsp/roth ira/401k) securities account has american stock and other registered account has canadian stock. If I want my asset allocation to happen equally 50% of each asset class in each securities account of usd and cad currency. Let’s say you contribute $1000 cad each month, how can you make sure how much of the $1000 goes in which securities account to keep asset mix equal not just overall, but in each registered account.

Example allocation
tax free registered account a:
asset class a - $500 in cad stocks
asset class b - $500 in usd stocks
total - $1000 50/50 allocation in each asset class
tax free registered account b:
asset class a - $100 in usd stocks
asset class b - $100 in cad stocks
total - $200 50/50 allocation in each asset class
overal total $1200 50/50 allocation in each asset class.

Adding $1000 deposit total, and how do i optimally I split it between 2 accounts to keep 50/50 mix in each account and asset type with stocks in multiple currencies? (as illustrated above).

Sorry if something is not clear, thinking of this a bit during my break from work.

Fixing my previous post*

I added Deposit account as well to the filter to use deposit to rebalance.

filter apply:
image

in action:

I was able to go further into this rabbit hole and now have a cash account per currency and security account. Also added Asset allocation per account type to avoid having to play with filters everytime to get asset allocations.

image

This would make a good wiki, or maybe one for Taxonomies and another for Rebalancing - How-To - Portfolio Performance Forum