Consider online portfolio switching algorithms. Assuming you have at least two assets, then the algorithm will generate an allocation vector, ie. 40% to asset A, and 60% to asset B.
Since American futures exchanges do not allow you to be long and short at the same time, you can use a long version of A and a short version of A, (same with asset B), giving you four inputs. Then the allocation vector will tell you long or short as well for each asset.