Divergence..

 
i came upon this divergence indicator by HAZEM...https://www.mql5.com/en/code/download/7076/FX5_Divergence_V2_1.mq4...fascinating piece work....assuming i am right, Divergence can be calculated on current candle close. But the indicator generates signal one candle behind...if 0 is the current candle, the signal first appears on candle 2...Can anyone modify the indicator so the calculations end up creating signal on candle 1....Thank you
Files:
Reason: