Index (Counter) on OnTick for an array: Help needed

 

Hello, still struggling with an EA: Is there any way to include an index or a counter to store variables on dynamic array in the OnTick section of the EA. I attach the example that I used but it does not work. Appreciate any suggestion.

Files:
EAv2.mq5  3 kb
 
Please generate a template you can specify variables and buffers there.
Reason: