[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 644
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
I already did it this way, but in the future I will also receive signals and the order will not open by the signal at all. It seems to be a simple thing, but I cannot figure out how to do it! Help!
How do you do it? GA
If we check for the presence of such a position in the market, it will be done. Until it closes, there will be no new position. If we check, for example, for the time after the position opening, then after a set interval has passed and the signal is present, the position with the same magic number and the same parameters will open again in addition to the existing one.
After all, you now have a set of positions opened (one at each tick) with the same parameters. You need them to open, but not so often. Open them either by time or on a new bar, or after a specified number of bars...
My friends, advise me where I can read about code optimization. I searched the website and found only information on optimization of Expert Advisors. Of course, I am not such a good tracker... I really need it. Visual testing slows down very badly, that is why I am interested in advice on code optimization, what to replace logical constructs with, and better of all, how to do it with examples, etc. In other words, I want to know how to optimize an EA. Where can I read?
I also wondered about it, but did not find anything useful. When it comes to optimization, you already know about the great brake of iCustom :), in indicators there is a restriction on the number of bars, that can be calculated (through IndicatorCounted() or by the number of bars). In the code, there is no sense to bother with the number and complexity of different constructions like if, while, etc. You won't gain much, but with time and experience, the code will become more "beautiful". Well, in visualization mode, when every "bounce" is modeled, it will be slow almost in any case (depending on complexity of the system, of course). Somewhere I read that if complex calculations in a dll, it will be faster, but I have not checked it. With dll, also enough nuances.
I already did it this way, but in the future I will also receive signals and the order will not open by the signal at all. It seems to be a simple thing, but I cannot figure out how to do it! Help!
How do you do it? GA
Well that depends on the architecture of the EA itself. Throw in the code, let's see.
I also wondered about it, but did not find anything useful. When it comes to optimization, you already know about the great brake of iCustom :), in indicators there is a restriction on the number of bars, that can be calculated (through IndicatorCounted() or by the number of bars). In the code, there is no sense to bother with the number and complexity of different constructions like if, while, etc. You won't gain much, but with time and experience, the code will become "nice" itself. Well, in visualization mode, when every "bounce" is modeled, it will be slow almost in any case (depending on complexity of the system, of course). Somewhere I read that if complex calculations in a dll, it will be faster, but I have not checked it. There are enough nuances with dll, too.
My friends, please advise me where I can read about code optimization. I searched the site - the only thing I came across was optimization of Expert Advisors. Of course, I'm not a good tracker... I really need it. Visual testing slows down very badly, that is why I am interested in advice on code optimization, what to replace logical constructs with, and better of all, how to do it with examples, etc. In other words, I want to know how to optimize an EA. Where can I read?
I am ashamed of my ignorance, but I still do not know how to insert the indicator code into the Expert Advisor code, so I don't have to bother with iCustom. I would like to read a good article on this subject somewhere, with some examples, like - let's bake an indicator in sauce and directly wrap it in an Expert Advisor. It would be great... I still use some useful but slow custom indicators...
https://www.mql5.com/ru/articles/1456
https://www.mql5.com/ru/articles/1457
https://www.mql5.com/ru/articles/1463
+ search for "transfer indicator"
https://www.mql5.com/ru/articles/1456
https://www.mql5.com/ru/articles/1457
https://www.mql5.com/ru/articles/1463
+ search for "transfer indicator"
Wow, huge!!!
Once you've worked out how to transfer the indicator to the EA, don't be in a hurry to put it into practice. in this case you need to weigh everything up very carefully. the EA and the indicator are separated from each other for a reason.
The EA and the indicator are separated from each other for a reason.