Help on my indicator

 

Hello everyone,


  I'n new on this forum and know very little about mql programming, but I have created my own indicator using an online expert advisor builder app.

The indicator is very simple, it is based on  the change of the direction of the Momentum indicator. ( I use this indicator for binary options ).

The only problem with my indicator is that, when launched and running, it only shows me downward arrows, but when I delete the indicator from the chart and insert it again, it shows me the correct signals.


I attach the print screens with the correct and incorrect signals, and also the indicator itself, if anyone can give a little help in solving this problem.


  Thank you very much 

Files:
Reason: