
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
Give me the code, we'll figure it out by tonight.
You can write it in person :)
Give me the code, we'll figure it out by evening.
//+------------------------------------------------------------------+
Don't judge, last time I wrote a program in Sinclair, in Basic when I was at school .....
Is it possible to set a system of priorities in MQL4, so that first the code of the managing EA is executed, and then all other EAs?
Of course it is possible.
Organise the work of EAs according to "master-slave" scheme
Of course you can.
Organise master-slave advisers to work in a "master-slave" way
Please tell me more about how to do it. Trading Expert Advisors can be influenced only by changing the global variable and they listen to this variable GlobalVariableSet ("Freeze1",200) when my "manager" deigns to wait his turn and write there 200
Please tell me more about how to arrange this. Trading Expert Advisors can be influenced only by changing the value of global variable and they listen to this variable GlobalVariableSet ("Freeze1",200) when my "manager" deigns, waiting for his turn, to write 200 there
Why does your manager, if he is the manager, wait for some kind of turn?
It's the slaves who should wait for theirs: manager has written a trade ban in GV - they sit, stay quiet (slave has checked global flag first tick, if 'sit no bleep' - said JawolGerGeneral, and return(0))...
Why is your manager waiting his turn to access the GV flag?
It's all done by one Expert Advisor )))) You can put as many as 100 pairs into it ))))
That's not what we're talking about...
master
slave
I hope I have made myself clear.
master
slave
I hope I have made myself clear.
All clear, thank you.
I've tried it this way (i.e. to prohibit and allow according to the situation), but it works the following way for me:
After this initialization of the master: int deinit().... // prohibition of work by sl aves is silent, but as soon as the wizard relaxes ( if (number of identical majik <=2) ) and writes in GlobalVariableSet(work,1); // enabling slaves , and there are 8 slaves on 8 different pairs, manage to open in 4 - 6 pairs instead of 2 as specified in the master's conditionThey open BEFORE the master "understands" that the "number of identical majicies" is significantly greater than 2. After that of course the other slaves are silent, but it is no longer open 2 copies as desired, but 4 - 6.
As I understand it, control is given to int start ( ) slave EAs after I execute int start() code and it depends on int start( )of slave EAs and how many copies of each pair will open before start of the wizard and a global one becomes prohibitive. Please correct me if I have misunderstood the terminal's algorithm and the essence of the problem. Roughly speaking so: if one master and one slave is most likely to work correctly, but the slaves then 8-10 !
That's why I wrote, I tried to loop start master and make it stay on forever, but my terminal just hung.
artmedia70: " why is your manager, if it is a manager, waiting for some kind of queue? " - that's what I'd like to know.
And why and why are two identical magicians being made?
Global variables can be used to assign non-overlapping magic areas to the included EAs. The corresponding checks and assignments are made in init().
Besides, we can limit the number of orders opened for each symbol by specifying it explicitly or by assigning a master, depending on the current general situation, which is exactly what the master should control.
This means that if the slave makes an action, he/she has to report to the master. The master, in turn, must give his summary, on which the slave's further actions (or inaction) depend.