By replacing NumOpenTotal with an array that contains individual open position values for each individual asset. Than you put your code in an asset loop with a counter that refers to the asset's array position for your trading rules.
Last edited by Grant; 06/13/22 23:02.