This is based on the fundamental moving average crossover algorithm I posted earlier. This version uses two fundamental metrics and increases the time period for the longer-term moving average to three years. It also uses a weighted moving average instead of a simple moving average. The variable names were also changed so different fundamental metrics can be used without either rewriting lots of code or using variable names that don't make sense. Some of the quarter lengths in the original version of the algorithm were incorrect and they were updated as well.