Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 396

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
The variable string x; should not be confused with the string character "x".
I did not understand the specific task. Accordingly, there is no specific answer.
Maybe you'd better think about overloading functions?The situation is such that I need to create a universal function function_xy where the main program would understand that the name of the string variable object_xy changes depending on parameters passed(..., ..., string x, string y). Otherwise, further down the code in function_xy() I'll have to manually spell out the name of variable object_xy.
For example,
Otherwise when creating several graphical objects in function_xy(), I'll have to manually assign parameters of graphical functions
There are up to 2 hundred of such functions, can you somehow reduce and solve this problem?
I hope I have expressed my thought.
The situation is such that I need to create a universal function function_xy where the main program understands that the name of the string variable object_xy changes depending on the parameters passed(..., ..., string x, string y). Otherwise, further down the code in function_xy() I'll have to manually spell out the name of variable object_xy.
For example,
Otherwise, creating several graphical objects in function_xy(), I'll have to manually assign parameters of graphical functions
There are up to 2 hundred of such functions, can you somehow reduce and solve this problem?
I hope I have expressed my thought.
All you need to do is write a piece of code that will form object name depending on X and Y, for example, take it from array like this: n=10*x+y. When x=0 and y=0...9, the first 10 elements will be chosen. When x=1 and y=0...9, the next 10 elements will be chosen
What's the use of checking mistakes - you have to react to them!!! How? Print("Error - ...") - this is good only during debugging. And even that would be better than Alert(). You have to react to an error by pause = delay. There was an article about it somewhere. But where? If someone saw it - remind me!
The situation is that I need to create a universal function function_xy, in which the main program would understand that the name of the string variable object_xy changes depending on the parameters passed(..., ..., string x, string y). Otherwise, further down the code in function_xy() I'll have to manually spell out the name of variable object_xy.
For example,
Otherwise when creating several graphical objects in function_xy(), I'll have to manually assign parameters of graphical functions
There are up to 2 hundred of such functions, can you somehow reduce and solve this problem?
I hope I have expressed my thought.
If I understand you correctly,
it goes something like this.
Is that a decompile? Remove it immediately! It's forbidden here!!! Banned...
Hello, a parenthesis drinks blood from me I can't pair it (it gives out a bunch of errors right away). The parenthesis is in the first line.
You have been warned for posting decompiled code.
Sorry, I won't do it again...
Thanks)
To avoid rewriting, maybe you can overlay the trend lines on those segments that are >=100pts.
Can you tell me how to set the coordinates for the trendline points to plot it from the trough to the top of the zigzag -a.
Hello!
For a fortnight I've been working on a script that will check if the prices in the array are currently available for such an order....
Now I have come to a standstill while searching through the array. For some reason it's not giving out what's expected.
it doesn't give out the wrong...
warrants:
Hello!
For a fortnight I've been trying to come up with a script that would check if the price in the array is now....
Now I got stuck on array search. For some reason, it doesn't give us what we expect.
It is correct:
ArrayBsearch
Returned value
Returns index of the first found element. If the sought value is not found, it returns the index of the closest by value element, between which the sought value is located.
You have the order prices (order by time of placing)
the first is 11,00000
the second 22.00000
third 0.98020
fourth 0.98004
fifth 33,00000
1, 2 and 5 respectively find correctly, but for 2 and 3 the nearest lower value...