Skip to content

dividends - PineScript Variable

The dividends record provides forward-looking information about the next expected dividend for the chart’s symbol. Values are populated when TradingView has corporate action data for the instrument.

FieldTypeDescription
dividends.future_amountseries floatProjected dividend payout amount (in the instrument’s currency).
dividends.future_ex_dateseries intUNIX timestamp (ms) of the upcoming ex-dividend date.
dividends.future_pay_dateseries intUNIX timestamp (ms) of the expected payment date.
  • Dividend values are fetched once during the script’s initial calculation. They remain unchanged until the script is reloaded, even after the event passes.
  • Fields return na when TradingView lacks data for the symbol (common for instruments without dividends).
  • Use request.dividends() for historical series when you need more than the next scheduled payout.
//@version=5
indicator("Dividend countdown", overlay=false, max_labels_count=1)
nextAmount = dividends.future_amount
exDate = dividends.future_ex_date
daysUntilEx = na(exDate) ? na : (exDate - timenow) / 1000 / 86400
plot(daysUntilEx, "Days until ex-date", color=color.orange)
if barstate.islast and not na(nextAmount)
label.new(bar_index, daysUntilEx,
text = "Next dividend: " + str.tostring(nextAmount, "#.##"),
bgcolor = color.new(color.orange, 70),
textcolor = color.white)