Hi Jason,
Welcome to p123!
If I were constucting a very simple system to do what you wish, I would create a ranking system that has a single rule of PEExclXorTTM (excluding extraordinary, trailing twelve months), with a setting of lower is better.
Then in the simulation Buy Rules, have a single rule that states: PEExclXorTTM>4.9
However, from my own experience, I would never use the PE ratio. From an accounting perpective, companies have an incredible amount of leeway in calculating what their earnings will be. Being at the bottom of the Income Statement, net earnings are the most easily manipulated line item in a quarterly report. In fact, some companies are notorious for setting low expectations and then engineering their earnings to just beat those expectations, usually by amost exactly the same amount every quarter.
For this reason, I use top line Sales, Gross Profit, Operating Income, Operating Cash Flow, etc. Also, price is not the best option as a numerator, because it only includes the market capitalization (equity) of the company. Enterprise value is a much better option (imho) because it takes into consideration the capital structure of the business (i.e., it includes the company’s debt and does not include the cash). EV is similar to what a private acquirer would pay for a private business.
Some formulas to try: SalesTTM/EV, OpIncTTM/EV, OperCashFlTTM/EV, etc. (Always invert and put the factors like earnings, cash flow, OpInc, etc. in the numerator because it prevents your calculations from being skewed by companies where these are negative. If you really are determined to use PE, try instead E/P (earnings yield).
Remember: Invert, always invert: