Moving Avarage Indicator Errors.

 

Hi everyone!

Im new in code writing and i need your help please.

I wrote an indicator which drawing arrows as seen in attached pics.

The problem is, that sometimes the indicator giving false signals and i dont understand why.

Please help and thanks alot.


***The indicator is also sending notification messages if there is a signal.

The code is free to use for everybody.

Files:
Reason: