Weird problem.. please clarify

 
I am declaring a

extern int IndCnt=0;

Using the above variable in 2 different custom functions, the variable is incremented only in START () routine..

My problem is, when I open the “Meta Trader” Terminal for the first time under 15 mins period.. it is showing last incremental count of 20; the moment when the price ticks, the count gets doubled (and becomes 40).

Also, when I change the period from 15 to 30 mins, please assume the 30 mins period process count is 10, instead of current period count 10, it is showing 30 (by adding 20+ from 15 mins).

I have also tried Static, still no difference. Please fix/explain it.
 
extern variables are input parameters and should be change from outside and are really set from outside. do not change extern variables in the program
 
Point noted. Thanks for the valuable clarrification.

How to solve the problem.

Where to declare a variable, so it could be accessed in start(), user_functions()... and does not get changed when price ticks, only when it is specifically changed.

Please help
 
Point noted. Thanks for the valuable clarrification.

How to solve the problem.

Where to declare a variable, so it could be accessed in start(), user_functions()... and does not get changed when price ticks, only when it is specifically changed.

Please help

Same place just do not type "extern" in front of it.
 
Thanks sub. I have tried that also.

But, the codes seems to be buggy. Would check that in deep.