Kaloko:
Please anybody could inform me how it is possible for a variable not to be initialize every time the timeframe changes...
I want to create an MTF indicator and some prices of variables should stay the same when timeframe changes and not initialize them again!!!
Use global variables.
Global Variables of the Terminal - MQL4 Reference
- docs.mql4.com
Global variables are kept in the client terminal for 4 weeks since the last access, then they will be deleted automatically. An access to a global variable is not only setting of a new value, but reading of the global variable value, as well. When testing and optimizing the Expert Advisors that use global variables, keep in mind...
- Unlike indicators, EAs are not reloaded on chart change — just use globally declared or static variables.
- For indicators, it should just redraw everything. You do not want it do different things. Rethink your problem.
William Roeder:
- Unlike indicators, EAs are not reloaded on chart change — just use globally declared or static variables.
- For indicators, it should just redraw everything. You do not want it do different things. Rethink your problem.
Thank you for your reply!!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Please anybody could inform me how it is possible for a variable not to be initialize every time the timeframe changes...
I want to create an MTF indicator and some prices of variables should stay the same when timeframe changes and not initialize them again!!!