Combine the BARDATE() function with a true/false condition to show when that event last occurred in a watchlist, chart header, or Chart Element. For example, the date of the highest high price:
SIG1 = HIGH() == HIGHESTHIGH(RANGE=All Time); BARDATE(SIG1)
When the latest closing price was this high:
D1=LAST(CLOSE()); BARDATE(CLOSE()>D1)
To count the number of days since the event use the TIMESINCESIGNAL() function:
D1=LAST(CLOSE()); TIMESINCESIGNAL(CLOSE()>D1, UNIT=Days)
In this example, NXT on the ASX had its highest close since July 3rd 2018 (569 days ago).