Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 261
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
And it worked more or less fast with just one dynamic indicator, but when I increased the number of indicators, everything slowed down drastically.
Should I sprinkle it with holy water?
What other advice can I give you? You've stuck to the fact that you've got it right. The logic is excellent, the algorithm is super. Everything is fine-tuned, there are no bugs anywhere, the entire code is optimized for speed of execution.
I can give you Hottabych's phone number.
the question was
1) does the work of the indicator differ if it is called through iCastom
2) Is it reasonable to try to rip out calculations from the indicator and paste them into the Expert Advisor?
I also have a thought - when I click on help, it shows build 509 - I've read that there are newer builds and the new one might work faster - maybe this will help?
the question was
1) does the work of the indicator differ if it is called through iCastom
2) Is it reasonable to try to rip out calculations from the indicator and paste them into the Expert Advisor?
I also have a thought - when I click on help, it shows that I have the build 509 - I've read that there are newer builds and the new one might work faster - maybe this will help?
In your case (theoretically), considering that when you call the indicator with new parameters, the terminal loads a new copy of the indicator and recalculates the entire history volume on the chart, it makes sense to "cut the calculations from the indicator". Do not forget to add the parameter of the number of calculated bars. But the stick is always "double-edged": a correct indicator on every tick recalculates 1-2 bars, the code in the Expert Advisor will calculate a certain number of bars for each tick (and usually the calculation of the algorithm of the indicator requires more than the previously mentioned 1-2 bars).
Such complex (adaptive) systems should be run at the arrival of a new bar. A new build (for now experimental) will not help.
P.S. An example of "ripping out" an indicator code can be seen here.
Thank you, that sounds about right.
I just need to understand the code a bit:)
It's good that it's well commented.
In your case (theoretically), considering that when you call the indicator with new parameters, the terminal loads a new copy of the indicator and recalculates the entire history volume on the chart, it makes sense to "tear out the calculations from the indicator". Do not forget to add the parameter of the number of calculated bars. But the stick is always "double-edged": a correct indicator on every tick recalculates 1-2 bars, the code in the Expert Advisor will calculate a certain number of bars for each tick (and usually the calculation of the algorithm of the indicator requires more than the previously mentioned 1-2 bars).
Such complex (adaptive) systems should be run at the arrival of a new bar. The new build (for now, an experimental one) will not help.
P.S. An example of "ripping out" the indicator code can be seen here.
But there is an alternative option - to organize on the basis of the EA dynamic buffers, as in the indicator, and to transfer the entire logic to the EA. In this case, the only thing the programmer needs to take care of is the size of the buffers, that automatically adjusts for the number of bars in the history (the same as the terminal does for the indicator). In other respects, we obtain the advantages of the Expert Advisor and the indicator in one package (plus the number of buffers is almost unlimited).
How to organise dynamic buffers in an EA, I showed once, I can repeat it, if you need.
I thought I heard that standard indicators can also be modified - is it possible to make them read a limited number of bars instead of the whole history?
Of course, it is enough to set an appropriate condition, in the standard examples it is a variable limit