Roost_12:
[...] I hope you understand what I wish to know. My question is very basic in nature but I want to know the answer.
Thanks in advance. :)
OrderTotal() is called only once in your example. In other words, if you did a long sleep immediately after iA = OrdersTotal(); then the value in iA might no longer match the number of open orders (because of manual activity, or activity in other EAs).
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,
when you call a function that returns a value and assign it to a variable...and then use that variable in your code. Does the function get executed each time (the variable just makes the code look nicer)? Or does the function get executed only once, i.e. at the variable assignment, and then each time you use the variable the program just retrieves a value from the memory (the variable reduces the number of function calls needed)?
Let me give you an example:
I hope you understand what I wish to know. My question is very basic in nature but I want to know the answer.
Thanks in advance. :)