I was wondering if someone could please help with the following, and/or direct me to where this has already been answered.
I am testing a system on a portfolio of just 3 ETFs. Buy and Sell signals can come on any bar. What I want to be able to do, is allocate 100% of equity irrespective of how many open positions there are, assuming there is at least 1 open position.
Meaning, when the 1st buy signal is triggered, I would use 100% of equity. If then a 2nd buy signal was triggered, the system would sell 50% of the current open position, and allocate 50% to the new trade.
It would also scale out. If say I had 3 positions open at 33.33% equity, and 1 position issued a sell. This position would be sold, and the available equity split 50/50 to the 2 remaining open positions, which would increase from 33.33% each to now 50% of equity each.
Any help would be appreciated.