[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 497
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Friends, I've run into a simple problem, but I can't seem to solve it. The essence is as follows. When certain conditions are met, a trade opens (let's call it a lead trade). And I need to open another trade (repeat) within the next 3 bars, if this condition is repeated. If within the next three bars the condition I need is not met, then a trade should not open again until the next time the trade will be opened again. And so on. I have, for some reason, reopen only one time (I mean, when all conditions are met in general the first time - it opens, but hereafter, when after the new leading position appears condition of opening a repeat trade - it is not opened). Help, please.
Friends, I've run into a simple problem, but I can't seem to solve it. The essence is as follows. When certain conditions are met, a trade opens (let's call it a lead trade). And I need that within the next 3 bars, if this condition is repeated, another trade (repetition) is opened. If within the next three bars the condition I need is not met, then a trade should not open again until the next time the trade will be opened again. And so on. I have, for some reason, reopen only one time (I mean, when all conditions are met in general the first time - it opens, but hereafter, when after the new leading deal appears condition of opening a repeat trade - it is not opened). Help, please.
Do not forget (or get used to it - as you like) that the EA can be reloaded while working (if it is not a tester, of course), and that means that the values of flags LOSE if they are not written somewhere during deinitialization and not restored during initialization. It is easier to "keep track" of your orders. If there is a difference between the orders (in this case, a master and a slave), then they can be distinguished by different mags, or by a record in the comments, or the second slave opens after the 1st order (whatever your heart desires).
Separate the code into user-defined functions - so it is easier to read and understand: separately for opening (getting a signal), separately for getting STOP and separately for opening orders. The sense of this loop is absolutely unclear:
If it is the mentioned check: "within the next 3 bars" - then I've missed something in this life...
You have an opening time of the first "master" order - use it as a guide.
Please help or advise on how to deal with the smooth running of EAs. The situation is as follows:
1. I ran a real micro account with 36 Expert Advisors on 21 symbols on TF D1, which do not switch off during 24 hours a trading week;
2. I have 58 more 58 Expert Advisors on demo accounts also on D1, which I am forced to switch off during 1-3 minutes, after they make trade decisions, starting from 00-00 server time of the DC every day, which takes a lot of time and nerves deep into the midnight;
3. 3. We have started a demo account on the H4 TF, which works on a permanent basis.
Question: How to run Expert Advisors in the step 2 on a permanent basis? I do not have enough virtual memory on my PC right now. What to do: to increase the RAM, change the computer to a dual-core or look for a more powerful laptop? Or maybe there is another organisational or software solution?
Please help or advise on how to deal with the smooth running of EAs. The situation is as follows:
1. I ran a real micro account with 36 Expert Advisors on 21 symbols on TF D1, which do not switch off during 24 hours a trading week;
2. I have 58 more 58 Expert Advisors on demo accounts also on D1, which I am forced to switch off during 1-3 minutes, after they make trade decisions, starting from 00-00 server time of the DC every day, which takes a lot of time and nerves deep into the midnight;
3. 3. We have started a demo account on H4, which works on a permanent basis.
Question: How to run Expert Advisors in the step 2 on a permanent basis? I do not have enough virtual memory on my PC right now. What to do: to increase the RAM, change the computer to a dual-core or look for a more powerful laptop? Or maybe there is another organisational or software solution?
I do not quite understand point 2 about reviving? Do you give them artificial respiration or make them sniff ammonia.
RAM accumulation is the cheapest and most effective method which I myself use when necessary. The more RAM, the faster everything moves. And also an upgrade of the rest of your hardware, if the old one does not do the trick anymore. Two cores for so many tasks on one computer will not be enough.
Please help or advise on how to deal with the smooth running of EAs. The situation is as follows:
1. I ran a real micro account with 36 Expert Advisors on 21 symbols on TF D1, which do not switch off during 24 hours a trading week;
2. I have 58 more 58 Expert Advisors on demo accounts also on D1, which I am forced to switch off during 1-3 minutes, after they make trade decisions, starting from 00-00 server time of the DC every day, which takes a lot of time and nerves deep into the midnight;
3. 3. We have started a demo account on H4, which works on a permanent basis.
Question: How to run the Expert Advisor in step 2 on a permanent basis? I do not have enough virtual memory on my PC right now. What to do: to increase the RAM, change the computer to a dual-core or look for a more powerful laptop? Or maybe there is another organisational or software solution?
Another organisational solution is a VPS (Virtual Privat Server).
Another software solution (if you have the same EA on different pairs) is to make a multi-currency EA out of your EA.
I don't quite understand point 2 about resuscitation? Do you give them artificial respiration or make them sniff ammonia?
RAM boosting is the cheapest and most effective method, and I use it myself when necessary. The more RAM, the faster everything moves. And then you can upgrade the rest of your hardware, if the old one doesn't do the trick anymore.
Another organisational solution is a VPS (Virtual Privat Server).
Another program solution (if the same EA is used on different pairs) is to make a multi-currency EA out of your EA.
1. Thank you, I will study this possibility.
2. Although the EA is the same, but the settings are different for different pairs, is it possible to create a multicurrency EA under these conditions? Besides, the accounts are different.
Another organisational solution is a VPS (Virtual Privat Server).
Another software solution (if you have the same EA on different pairs) is to make a multi-currency EA out of your EA.
VPS is not the best solution, because it costs money and not all hosting providers work reliably.
Multicurrency is not the best solution either.
A more acceptable solution is to move the EAs from one account to different terminals in order to relieve the trade threads. But the more terminals are running simultaneously, the more RAM is needed.
Meaning - they are switched on one by one for 1 - 3 minutes, then switched off again for 1 day. If you switch them on at once, e.g. more than 10, the computer starts to glitch and more time is lost than one or two at a time. Thanks, I'll try to ramp up the RAM, but do I need to know how much to ramp it up to? Or proceed by trial and error?
VPS is not the best solution as it costs money and not all hosting providers are reliable.
Multicurrency is not the best solution either.
A more acceptable solution is to move the Expert Advisors from one account to different terminals to relieve the trade threads. But the more terminals are running simultaneously, the more RAM is needed.