
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
Your example is a better one.
[/quote]
This example doesn't work. It gives errors. Could you, as a more experienced developer, help make it work?
Respectfully,
Quark
this is a check to see if they want to close the Expert Advisor externally
Question: these while and Sleep will not slow down the system?
the system will not be slowed down. only the single Expert Advisor
Question: will Sleep and semaphore be processed correctly in test mode?
It is more difficult to deal with semaphores. During testing, real working EAs may compete for this semaphore. You don't need semaphores at all, since only one EA is being tested - we cannot organize simultaneous testing of interacting EAs. to avoid semaphore activity in testing, use the IsTesting function
Also concerning the logic. Between setting and removing the semaphore we have two (maximum) possibilities to handle orders. First Buy() or Sell() and then, below, CloseOrder(). Won't these two "activities" compete with each other, though inside the EA, as if there were two Expert Advisors? Or the process is guaranteed to be linear and it will not get to CloseOrder() until Buy() returns?
These activities will not compete with each other since trade operations are now synchronous, i.e. expert waits until the trade operation is completed. "the process is guaranteed to be linear"
I won't force it. Wait a couple of days for GlobalVariableSetOnCondition function, then all access control problems will be solved
I won't force it. wait a couple of days for GlobalVariableSetOnCondition function, then all access delimitation problems will be solved
If you mean that you plan to introduce the GlobalVariableSetOnCondition function into MT, could you say a few words beforehand about it?
Including how you propose to use it in this situation?
A couple of days - counting weekends?
Why don't you make a queue of orders in MT. That is, you can asynchronously write a request to work on a position there, and MT in a separate thread will process that request when there is time, and with a guarantee that no one else will get in there.
Quark
Including how you propose to use it in this situation?
A couple of days - counting weekends?
I already showed an example
if a global variable has a value of 0.0, then set the value to 1.0 and return true. otherwise, don't set anything. check and change the value in one function call.
"a couple of days" - I said that just in case. hopefully we'll post it today
We will not make a queue of orders
Just didn't say what it is :) I thought the function was suggested to write to me.
I said "a couple of days" just in case. hopefully we'll post it today.
Thanks.
1. In these 100 posts there were several bugs found while working on the Expert Advisor, and not directly related to it. For example, I noticed that Expert Advisors continue trading even after removal of the Allow Live Trading checkbox. I hope you will not forget about them.
2. Below is the code of my Expert Advisor again. It generates errors 1, 129, 138. Could you a) tell me what 138(requote) is, why it occurs, whether it is related to semaphores, and how to fix it? b) Why 129? The prices are printed together with the error, they seem to be correct. c) About 1, too.
Let me remind you of the testing method: 12 minute windows for 12 currencies.
Respectfully,
Quark