- Global variables are for interprocess communication. Why do you need to get the value and save it for other code? What part of "since their last use," is unclear?
- On MT4: Unless the current chart is that specific pair/TF referenced, you must handle 4066/4073 errors.
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
whroeder1:
- Global variables are for interprocess communication. Why do you need to get the value and save it for other code? What part of "since their last use," is unclear?
- On MT4: Unless the current chart is that specific pair/TF referenced, you must handle 4066/4073 errors.
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
Why do you need to get the value and save it for other code?
This is a simpler working solution.......correct? or is there some other unforeseen reason that I can not use this code to fix a MTF issue?
Michael Green:
Why do you need to get the value and save it for other code?
This is a simpler working solution.......correct? or is there some other unforeseen reason that I can not use this code to fix a MTF issue?
The better working solution is to simply get the 4 hour cci data from the same EA instead of relying on an external program.
ok so how would I code this?
Michael Green:
ok so how would I code this?
You already did
ok so how would I code this?

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
Hi,
Can somebody please tell me if my coding solution is correct in solving a 4 H MTF call for an EA that runs on a 1 H chart, or at least clarify further the following:
I run a separate EA to call the 4 H CCI to my 1 H based EA as shown below:
Then I run the following code in my EA:
The question to clarify is that is this a workable solution? in that I read in MQL4 reference the following:
Note
Global variables exist in the client terminal during 4 weeks since their last use, then they are automatically deleted.
Does this mean that they are deleted every 4 weeks or if they are used within a 4 week period then they are not deleted?
Any advice would be very much appreciated, I look forward to any help on this topic.
Regards Mike