brief modification of pinescript stochastic indicator...please help

 
hi guys in the house .i currently use a PINESCRIPT DMI stochastic indicator(just 46 lines of code) on trading view.it overlays arrows on the chart for buys and sells.however this arrows come late(which is an obvious phenomenon in FX).I Would love to adjust this code so that it doesnt show the arrows after 2 -3 sec delay. am just learning pine script.dont really have an hang on it. anyone please.
Files:
Reason: