
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
You just have to specify a non-existent window number.
I.e. specify INT_MAX, for example. Or a negative value (I haven't tried it myself, but as an idea you can try it).
That is why you have to specify win_ind explicitly, otherwise it will not work.
Urain:
You just have to specify a non-existent window number.
I.e. specify INT_MAX, for example. Or a negative value (I haven't tried it myself, but as an idea, you can try it).
That's because I haven't tried it, that's why you advise so
OK, if you have checked the idea of specifying negative values and it does not prove to be true, let's stop at the first hint:
"You just have to specify a non-existent window number, e.g. specify INT_MAX". That is, in the above example specify
Or, in your case, when specifying a non-existing window number, theChartIndicatorAdd function refuses to work and create a new subwindow?
By the way, it's not quite clear why you have the same variable in your code
is first used as the fourth parameter of theIndicatorCreate function (where the fourth parameter == number of parameters passed in the parameters_array[] array) and then used as the second parameter of theChartIndicatorAdd function (where the second parameter == chart subwindow number).Read carefully.
https://www.mql5.com/ru/docs/chart_operations/chartindicatorstotal
Read carefully.
https://www.mql5.com/ru/docs/chart_operations/chartindicatorstotal
Is this what you mean?
CHART_WINDOWS_TOTAL
Total number of chart windows, including indicator subwindows
int r/o
By the way, it's not quite clear why you have the same variable in your code
first it is used as the fourth parameter ofIndicatorCreate function (where the fourth parameter == number of parameters passed in array parameters_array[]) and then it is used as the second parameter ofChartIndicatorAdd function (where the second parameter == chart subwindow number).Semyon Semyonych, that's right. I was careless when writing win_ind explicitly everywhere as 1 and then, when replacing it with a variable, I changed all 1's to win_ind. That's what gave you the electric shock :o)
The correct code would be this
Now yes, everything works automatically. Thanks for the code parsing, one head is good but two is better :o)
Taki yes :) By doing a double loop you can go through all the chart indices without too much trouble.
Unfortunately, no. The warrant system is not going to change.