100.000 bars? Don't calculate what you do not need.
CopyBuffer just copies the already calculated buffer. It will not trigger another calculation.
That’s my point! How do I ensure that when I call CopyBuffers it does not call my indicator to request it to process the entire history of bars. Perhaps I am misunderstanding something here. The documentation does not make it clear.
When I add my indicator to a chart, it processes just 800 bars at a time from the last visible bar going back in time, not the entire price history. This works well and there is virtually no lag. However, now I want to add this indicator to my EA using iCustom and CopyBuffers, but can’t find a way to control the number of bars that the indicator will process. CopyBuffers allows a start index and bar count, but this assumes that the entire data buffer has been filled.
Thanks
So my question is how do I effectively and efficiently write a complex cpu intensive indicator for use in an EA?
Ideally I would like to pass a start index and bar count to CopyBuffer that can be accessed by the indicator, or make them available to this function some how.
yes just set a maxbars parameter and set it to 1 when backtesting in an EA
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
So my question is how do I effectively and efficiently write a complex cpu intensive indicator for use in an EA?
Ideally I would like to pass a start index and bar count to CopyBuffer that can be accessed by the indicator, or make them available to this function some how.