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

What is a Stock Index?, How it is constructed? & Why It moves up or down?

In last few months, I have been hearing investors saying that markets are at peak so it cannot go up now, actually investors are not able to understand “what is