I'm brand new here, hi to everyone! This looks like an excellent knowledge share site for TOS. I was trying to script a custom quote to display a column on my watchlist for the prior year's dividend yield in percent. Mainly so that I can create columns for the prior 5 years of dividend yield (years 1-5) and see at a glance how the yield has changed compared to the 5 year avg and current dividend. TOS has prebuilt quotes for the yield % (current dividend) and the dividend yield (annual yield) but not for prior years. I was trying to modify the code I have below using the close() function in plain text, which runs in the thinkscript fine. When I change the function from "close()" to "getdividend()" or "getyield()" I receive errors from the thinkscript I have not been able to overcome. I was unable to paste a screenshot on the post, and the link I inserted to my google drive of the image was marked as spam, and I was unable to submit it. Any help would be appreciated.
"def agg = AggregationPeriod.YEAR;
plot data = close(period = agg)"
"def agg = AggregationPeriod.YEAR;
plot data = GetDividend(period = agg)[1];"
*No such parameter: period at 2:13
*0 params expected but 1 found while calling getdividend at 2:13
"def agg = AggregationPeriod.YEAR;
plot data = close(period = agg)"
"def agg = AggregationPeriod.YEAR;
plot data = GetDividend(period = agg)[1];"

*No such parameter: period at 2:13
*0 params expected but 1 found while calling getdividend at 2:13