hi guys , i need to increase a char after that the bid price reach to some points (it dont do any thing when its 0 or 1) , but i defined it in global values and its equals to zero, but the problem is that i dont want it become 0 after i refresh the bot or change time frime. do u have any idea? how can i save it? if u cant answer me , please just dont answer me
I don't know what you mean by " refresh the bot", but changing the time-frame should not change the value of a global scope variable in an EA. Do you initialize it in OnInit() ?
I don't know what you mean by " refresh the bot", but changing the time-frame should not change the value of a global scope variable in an EA. Do you initialize it in OnInit() ?
refresh means compile, and I know it don't change amount of globale scopes variables, but I need to save my char in a place to use it again after compile , did u get my meani
don't recompile when you are running the EA then you won't have the problem
if you are worried about values being preserved when EAs are started/stopped etc. use files or global variables to save them
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi guys , i need to increase a char after that the bid price reach to some points (it dont do any thing when its 0 or 1) , but i defined it in global values and its equals to zero, but the problem is that i dont want it become 0 after i refresh the bot or change time frime. do u have any idea? how can i save it? if u cant answer me , please just dont answer me