![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
Renat, zero - thank you very much for your attention to the topic and your constructive response!
Next.
1. about x64
Renat:
The more correct option is to upgrade to x64.
...
Of course, if someone will call hundreds of indicators in the mode of market scanning without their unloading, they should go straight to the 64-bit version + install additional memory.
It's strange to be doing massive tests sitting on x32 at the moment. Any decent x64 computer with 16GB of memory (without graphics cards and monitors fanaticism) can be bought for 15 000 rubles.
Switching to x64 is by all means the right course of action. But. One does not rule out the other. Even my 16gigs (I have them) I don't want to squander them on some unnecessary data. I have other things to work on in parallel - MSVS, Matlab, etc., on which I also want to calculate voluminous tasks. I am glad that you understand this and are willing to look for ways to save money.
2. about a fixed start of history:
Renat:
We ourselves want to reduce resource consumption. Perhaps the solution could be some function IndicatorMaxDepth(uint len), which will act only on indicators created in this EA.
But the problem is that during testing the buffers of indicators in accumulation mode will grow together with history and there will be no saving.
Completely (almost) agree. Disclaimer: In many cases optimization is done on a small chunk of the last story. In this case the savings may be quite substantial. Still, I consider the option as relatively working - especially if you have a good work or estimates on implementation. To me, for example, the option seems not quite full-fledged - a lot of labor, and the result is not radical. A half solution.
3. here's the yaz! :
Renat:
Trimming theindicator's history in rltime, while maintaining the set depth , is fraught with beautiful glitches and will directly knock out the programmers who calculate/used to the synchronism of bars of the chart and indicator buffer.
No ! , not fraught - if the chart bars behave the same way - synchronously. In other words - if the ring buffers (even if different in size) always (forcibly) use AsSeries flag - no massive trouble is expected for the user.
// In this case, it would be convenient to make all history buffers presented to the user - indicator (i.e. circular, with AsSeries=true).
In this variant:
(1) there is an internal representation of indicator and price arrays (on your side) : indexing from left to right (AsSeries==false), the sizes do not concern the user, and indeed"entry is forbidden".
And (2) there is a user's side - all buffers are circular (in the implementation. the user sees a virtual linear array), indexing is from right to left (AsSeries==true) and the size is set by the user.
What's the user's roof here? None. When out of range - standard response Array out of range.
Only you have difficulties (not small, to be honest). But! Considering universality of the scheme - you have to strain only once. And to nip all "nice glitches" in the bud, at beta debugging. After that - universal happiness and very economical construction.
We will perform revision of indicator cache, which now uses the principle of maximum efficiency against the principle of memory saving. Indicators that were rejected will be unloaded immediately, instead of keeping them in memory for some time, as it is done now. This will make it possible to call hundreds of indicators in a row with a direct unloading via IndicatorRelease.
3. Here comes the yazel! :
No ! It will not - if chart bars behave the same way - synchronously. In other words - if ring buffers (even if different in size) always (forcibly) use AsSeries flag - massive trouble is not expected for the user.
// In this case, it would be convenient to make all historical buffers provided to the user - indicative (i.e. circular, with AsSeries=true).
In this variant:
(1) there is an internal representation of indicator and price arrays (on your side) : indexing from left to right (AsSeries==false), the sizes do not concern the user, and indeed"entry is forbidden".
And (2) there is a user's side - all buffers are circular (in implementation. the user sees a virtual linear array), indexing is from right to left (AsSeries==true) and size is set by the user.
What's the user's roof here? None. When user goes out of range - standard reaction Array out of range.
Only you have difficulties (not small, to be honest). But! Considering universality of the scheme - you have to strain only once. And all "nice glitches" have to be nipped in the bud during beta debugging. After that everybody is happy and the construction is very economic .
Good idea, I'm all for it. But it doesn't cancel the implementation of the ring scheme, it just complements it nicely.Let me describe the test conditions:
As a result of automatic undercutting of the indicator we
I will describe the conditions of the test:
As a result of automatic undercutting of the indicator we:
1.
Yes, it is tolerable. It will hardly cause mass discontent, on the contrary, the economy will be very attractive. No one forbids wasting the memory by installing a huge MaxBar.
// But indicators glitch due to skipping of bars! That is where the discontent is justified!
// So you tolerate even that... :) Well, we have to... :(
2.
That's exactly no and no! The circular scheme is exactly what leads to huge savings on copying on history shifts. Actually, when shifting by one bar (N bars), we have to copy exactly one value (N values). The(user) costs of index virtualization are negligible. In fact, they are even difficult to detect in stress tests(the remainder of division is calculated by the processor during one clock cycle + shifting of the virtual buffer start at every shift through history takes another couple of clock cycles). So, there's almost no speed loss. It's impossible to detect this slowdown, it's so small. And on the background of huge memory saving these losses are incommensurable with the gain.
3.
Ehhh, a face...
For some reason, there's so much dancing and shouting about indicators choking on unlimited bars, but not a word about dancing graphical objects. Try to build, for example, super big Andrews' Pitchfork on Unlimited (on MN1, for example), then limit the number of bars in the terminal settings, go to low timeframes and rewind to the anchor points. Some of them will be in a tremendous time lag from the extrema (this is while the pitchforks of all three points lie exclusively in the area of real M1-bars, without going beyond the boundary of fake ones from higher timeframes!) And why is that? Apparently, because we did not have enough historical data on M1 to calculate the exact M1-value of some autobinding points. But what do historical data have to do with it? Well, maybe they were enough, but the bars displayed in the window were not, hence the shifts. That is, some points "do not really know where they are".
I wish somebody would check it for themselves, or maybe I'm the only one who has such a mess...
I have noticed an oddity!
At the moment of forming a new bar if you read Open and Close values of previous bars (for example 10 previous bars) and then 5 seconds later get them again, then some of these values are different and then if you get them while a new bar is forming then everything is ok, but in the first few seconds for some reason these values are different.
I hope I explained it clearly.
Can you tell me if before reading the values of Open and Close bars from the beginning of a new bar there should be a delay of more than 5 seconds?
Here is an example of operation:
Above is correctly triggered after a delay, below just after a new bar with an error, and on the right the benchmark for the 6th line.
Perhaps the problem is unsynchronised, it's advisable to track the new bar across all the tools in use.
Yes, you turned out to be right, thank you!
Similarly, opera.