Relationship between eps and markets

When should you invest in Equity or withdraw from Equity, considering PE Ratio?

In my last article I had explained what is a stock Index ? How it is constructed ? and Why it goes Up or Down?, the objective of writing that