There is no way to display next earnings date in a watchlist. The best we can accomplish from existing code is to display a 1 or 0 based on whether there is a futures earnings announcement within a specified number of days.
Here is the code. Taken directly from a built in scan filter named “Earnings”.
Input length = 10;
input choice = {default "Has", "Does Not Have" };
input Choice2 = {default "Any time", "Before the Market", "After the Market"};
def earnings = hasearnings();
def when;
switch (Choice2){
case "Any time":
when = hasearnings();
case "Before the Market":
when = HasEarnings(type = EarningTime.BEFORE_MARKET);
case "After the Market":
when = HasEarnings(type = EarningTime.AFTER_MARKET);
}
plot scan;
switch (Choice){
case "Has":
scan = sum(when,length)[-length +1] > 0;
case "Does Not Have":
scan = sum(when,length)[-length +1] == 0;
}