Hi. I'm new to tos / ThisnkScript, and this is my first post.
I'm trying to pull the MOST RECENT (historical) dividend. I've searched the forum, but haven't found a solution, so if this has been addressed, please point me in the right direction.
I can get NEXT dividend date into my watchlist using an excellent script by @tomsk (with dividends substituted for earnings). The script works well, but only returns a limited number of dates, because many companies haven't yet declared their NEXT dividend (I have the expansion area set to 100 bars). To get a more complete data-set, I'm hoping to pull the MOST RECENT ex-dividend instead, and approximate the NEXT date in Excel, using Frequency. If the date is off by a day or so, it's generally ok for my models.
I'm hoping someone can show me how to accomplish this. Thanks in advance!
I'm trying to pull the MOST RECENT (historical) dividend. I've searched the forum, but haven't found a solution, so if this has been addressed, please point me in the right direction.
I can get NEXT dividend date into my watchlist using an excellent script by @tomsk (with dividends substituted for earnings). The script works well, but only returns a limited number of dates, because many companies haven't yet declared their NEXT dividend (I have the expansion area set to 100 bars). To get a more complete data-set, I'm hoping to pull the MOST RECENT ex-dividend instead, and approximate the NEXT date in Excel, using Frequency. If the date is off by a day or so, it's generally ok for my models.
I'm hoping someone can show me how to accomplish this. Thanks in advance!