It turns out that there are different functions with the same name, but youcan't make it possible to pass a different number of parameters?
It can, but it is less than the parameters, the example button has many parameters, but
//+------------------------------------------------------------------+ //| Создает кнопку | //+------------------------------------------------------------------+ bool ButtonCreate(constlong chart_ID=0, // ID графика conststring name="Button", // имя кнопки constint sub_window=0, // номер подокна constint x=0, // координата по оси X constint y=0, // координата по оси Y constint width=50, // ширина кнопки constint height=18, // высота кнопки constENUM_BASE_CORNER corner=CORNER_LEFT_UPPER, // угол графика для привязки conststring text="Button", // текст conststring font="Arial", // шрифт constint font_size=10, // размер шрифта constcolor clr=clrBlack, // цвет текста constcolor back_clr=C'236,233,216', // цвет фона constcolor border_clr=clrNONE, // цвет границы constbool state=false, // нажата/отжата constbool back=false, // на заднем плане constbool selection=false, // выделить для перемещений constbool hidden=true, // скрыт в списке объектов constlong z_order=0) // приоритет на нажатие мышью
When I print an array to the log, almost all double values are printed to the specified 1 decimal place, and some 3-4 values (out of a hundred) with 15 digits.
Wanted a uniform wave, but for some reason "0" goes twice
because the conditions are confusing, on one iteration of the loop you should only have the up flag in one state, and you can have true and in the same iteration of the loop become false
I would write it that way in general:
int y = 0, shift = 1;
constint max_value = 100;
constint min_value = 0;
for(int i = rates_total - 1; i >= 0; i--)
{
Label1Buffer[i] = y;
y += shift;
if(y >= max_value || y <= min_value) shift *= -1;
}
because the conditions are confusing, on one iteration of the loop you should only have the up flag in one state, but you can have true and in the same iteration of the loop become false
Thank you.
It turns out that there are different functions with the same name, but youcan't make it possible to pass a different number of parameters?
It will draw even with a minimum of parameters
Greetings. Could you please tell me if and how it is possible to do this?
Is it possible to write your functions so that you can pass different number of parameters to written functions?
How, for example, in this function, you can pass 4 or 5 parameters.
The result is
Please help, I can't figure out what the error is
I wanted a uniform wave, but for some reason "0" goes twice
Why doesNormalizeDouble sometimes not work?
When I print an array to the log, almost all double values are printed to the specified 1 decimal place, and some 3-4 values (out of a hundred) with 15 digits.
...
2021.11.15 04:01:07.821Sov2EURUSD,M1: 9.9
2021.11.15 04:01:07.724 Sov2 EURUSD,M1: 9.800000000000001
2021.11.15 04:01:07.675 Sov2 EURUSD,M1: 9.9
2021.11.15 04:01:07.626 Sov2 EURUSD,M1: 9.6
2021.11.15 04:01:07.577 Sov2 EURUSD,M1: 9.1
...
Please help, I can't figure out what the error is
Wanted a uniform wave, but for some reason "0" goes twice
because the conditions are confusing, on one iteration of the loop you should only have the up flag in one state, and you can have true and in the same iteration of the loop become false
I would write it that way in general:
because the conditions are confusing, on one iteration of the loop you should only have the up flag in one state, but you can have true and in the same iteration of the loop become false
I would write it that way in general:
Can you tell me how to do it correctly
not to enter all elements that I want to add up, but just specify 5 elements
If you rename it to *.mq4, everything is fine.
If you compile it that way, you get errors.
I have no errors
I have no errors.
Anyway, it's not critical. Thanks for your help.