Issue 1 has been resolved. Increased this number from 6 to 7 and it fixed it. It also seemed that the indicator arrow was hiding behind the bars so increasing its size made it visible.
Issue number 2 I am still investigating. Any one who has had similar issue, please feel free to advice!
Issue number 2 - resolved .
It seemed i had forgotten to include INDICATOR_CALCULATION buffer type in the count of property at top of code.
Changed
#property indicator_buffers 9 -> 10.
That fixed my index buffer resizing issue.
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
Each of them has its own INDICATOR_DATA buffer defined by SetIndexBuffer method.
And the buffer is properly populated as well.
Issue 1: - SOLVED
However i notice after 6th indicator , 7th indicator isn't plotting on the chart. Is there a limit of 6 indicators ? When i switch the 7th with 6th indicator it is showing up but then the switched indicator at 7th location isn't showing up. Is this a limitation of Mt5? Is there a solution?
ISsue 2: - SOLVED
Also i noticed that for one of the buffers that i have used in SetIndexBuffer , the metatrder 5 terminal isnt resizing it for every new bar like it is supposed to do for other indicator buffers. On printing the Arraysize for other buffers i noticed other buffers that have been set by SetIndexBuffer are being resized for every new bar but one particular buffer isnt being resized. It is set at SetIndexBuffer number 9. The wierd part is that buffer at number 8 is working fine with regards to getting resized in onCalculate method automatically. When i tried to switch buffer 9 with buffer 8 by changing the number. Buffer 8 (which was previously buffer 9) is now getting resized properly but new buffer at index 9 still has that problem. Any idea why that would be? There isnt much difference in this buffer and other buffers except i use it to store values from an external indicator's buffer. Is there again a limit thats not documented ?
I feel this documentation (customindicatorproperties)is not correct. Have you guys experienced this while coding more than 7 index buffers? Or experienced issues plotting more than 6 lines on chart?