I have tried to search literally all over mql5 forum but I haven't found any page describing global and local variables and how to fix them. Can anybody send a link to them so that I can debug my ea's. And sorry for a seriously newbie question.
Fedor Arkhipov: You shall read book about programming in C++. MQL4 and MQL5 languages have same syntax
Another couple of good reference points:
Visibility Scope and Lifetime of Variables
GLOBAL VARIABLES OF THE TERMINAL