Hi all I'm having problem with iBANS indicator buffer. When I run my function it will run until my RAM memory reaches max and then it will return only 0.0 values from IBANDS indicator. Ones I stop function RAM is freed and and then when I start function again it will return normal values until RAM reaches max memory again.
How can I empty iBANDS indicator buffer during loop? Thanks in advance.
It's because you are creating potentially thousands of indicator instance since you are not using the correct shift index param.
band_main= iBands(Symbol(),PERIOD_M5,20,2,frame,PRICE_CLOSE,MODE_MAIN,0);
band_main= iBands(Symbol(),PERIOD_M5,20,2,0,PRICE_CLOSE,MODE_MAIN,frame);
Do try and avoid the overuse/abuse of global variables, and also use iBarShift instead of the while loop to test if the time is greater...
It's because you are creating potentially thousands of indicator instance since you are not using the correct shift index param.
Do try and avoid the overuse/abuse of global variables, and also use iBarShift instead of the while loop to test if the time is greater...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all I'm having problem with iBANS indicator buffer. When I run my function it will run until my RAM memory reaches max and then it will return only 0.0 values from IBANDS indicator. Ones I stop function RAM is freed and and then when I start function again it will return normal values until RAM reaches max memory again.
How can I empty iBANDS indicator buffer during loop? Thanks in advance.