Would it be best to purchase preferred and equity shares that pay dividend after the ex-dividend date since the shares would be slightly cheaper?

After the dividend date, I have notice that shares prices in most cases are slightly cheaper. Since dividends are paid from retained earnings of the company. This would allow small investors to make purchases that are just a little bit below the previous market highs. This is good to keep in mind deciding on when to purchase equity and/or preferred shares.