Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1199
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
Can you tell me how to request data from Program.mqh?
there is the following code
how to request point data from EA?Can you tell me how to request data from Program.mqh?
there is this code
how to request point data from an EA?All you need to get an object from any chart is an object name and a chart identifier:
Thus, you can get the data of any object from any program in MQL4.
All you need to get an object from any chart is an object name and a chart identifier:
Thus, you can get data of any object from any program in MQL4.
You misunderstood me...
The above code is in the file Program.mqh =>OnTimerEvent
The values of points are periodically updated and the Expert Advisor needs to receive these values.
Hence the question: How to request data from Program.mqh?
You misunderstand me...
the above code is in the file Program.mqh =>OnTimerEvent
The values of the points are periodically updated and the Expert Advisor needs to receive these values.
So, my question is: How can I request data from Program.mqh?
No one is stopping you from declaring variables,
declare variables in public area of the CProgram class and access them from the Expert Advisor without any problems.
You misunderstood me...
Of course, I didn't understand right away, because the description of the problem must be more complete. Ideally, it is desirable to add source code.
Is theProgram.mqh file connected to the EA?
If yes, no one is stopping you from declaring variables,
in global scope of class CProgram and get access to them from Expert Advisor without any problems.
Program.mqh file is connected...
I will now try to declare variables globally
Program.mqh file is connected...
now try to declare the variables gobally
Edited:https://www.mql5.com/ru/forum/160683/page1199#comment_17172497 as you initially confused me...
No one is stopping you from declaring variables,
in the public area of the CProgram class and have no problem accessing them from the Expert Advisor.
does not work
doesn't work
You need the source code or code of theCProgram class.Otherwise, it won't work...
I meant make it like this:
The threesome is something I don't know about your class :)Need source code or code forCProgram class.Otherwise, it won't do the job...
I meant make it like this:
Three dots, that's what I don't know about your class :)Thank you!!! It worked.
I unknowingly put
I took out the zeros and it worked.
Thank you very much.
Thank you!!! It all worked out.
I unknowingly put
I took out the zeros and it worked.
Thank you very much.
One more thing. It's better to perform initialization:
Otherwise, the Expert Advisor may receive random data in variables before the timer's tick, if reading is performed in OnTick().