The ex-dividend date was created to allow all pending transactions to be completed before the record date. If an investor does not own the stock before the ex-dividend date, he or she will be ineligible for the dividend payout.
Let me know if you have implemented this process when I have stocks in position and then I buy more of the same stocks and date is the ex-dividend period, dividends will be not eligible for these new shares.
I hope all your help.
Thanks a lot.