Le Minh Duc #: You're right, but this doesn't answer my question. The problem here is that it doesn't display properly, not that it makes the program inflexible. In fact, after loading the indicator into the chart, the user can still change the display properties.
One thing to note from a quick glance at your code ... you are mixing the buffer index and the plot index.
You have 16 buffers for 8 plots, but you are referencing your plots using the same index as the buffers. That is incorrect.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
One thing to note from a quick glance at your code ... you are mixing the buffer index and the plot index.
You have 16 buffers for 8 plots, but you are referencing your plots using the same index as the buffers. That is incorrect.
It should be as follows ...
Not sure if you have actually compiled and tested my code. In the picture I sent, I can still run it normally but it cannot display properly.
2. It is not necessary to define indicator properties using #property. I have defined it all in BasicInit() and ColorBufferInit() functions
3. I defined it on line 18, and the file I attached can still compile normally.
That's wrong, it's MANDATORY to define plots with #property.
Even if you define them dynamically in the code.