I am interested in updating some code. Currently, the formula looks to index X to determine a trigger. If it triggers, the formula will buy based on the criteria of the backtest. Can I have it purchase A stock is X index is up and B stock if X index is down? In other words, I would like to specify which stocks to buy depending on x index or other criteria. Thanks.