How to change the moment to appear an arrow?

 
I want to edit ADX crosses to arrow appear 5 seconds before the end of candle? Is it possible? Thanks
 
datetime ACTION = Time[0] + PeriodSeconds() - 5;
 
datetime ACTION = Time[0] + PeriodSeconds() - 5;
if( TimeCurrent() >= ACTION){ ...
Note if the code is in start and there is no tick during that 5 seconds, the code won't work. You'll have to use the timer.
Reason: