How to know when a market’s trend has changed