Nerd Trader #: Yes indeed as much as 8 pieces, but the chart does not show that the price is 0 does not matter, the line still clings to the cursor (follows it)
Don't use ObjectDelete because the line runs away to "0" every time
Don't use ObjectDelete because the line runs away to "0" every time
better
I have the renaming option and yes it works. In the case of ObjectDelete() then why green and red lines are created in one instance and do not flicker? And yellow line (Stop Loss) if already there is why it is infinitely proliferate when it is below Bid?
Nerd Trader #: I have the renaming option and yes it works. In the case of ObjectDelete() why green and red lines are created in one instance and don't blink? And yellow line, if it already has one, why does it keep multiplying infinitely?
These lines are in your control.
if(id==CHARTEVENT_OBJECT_CLICK){
And the lines that flicker react to any OnChartEvent, because
And the lines that flicker react to any OnChartEvent, because.
I told him: Button pressed - create line, button released - delete (same with other types of objects that can be linked to). But he said: it's nothing, I'll do everything "normally". :)
If successful, the function returns the number of the subwindow (0 means main chart window) where the found object is located. If no object is found, the function returns a negative number. To get more information aboutthe error, callGetLastError() function.
And the lines that flicker react to any OnChartEvent, because
as well as the green line, in general all lines also react to cursor movement. I just realized that all three lines are created in the spread area because the yellow line "Sell Stop" has the condition if(price > Ask) for the green line "Buy Stop" (price < Bid) and for the grey line "not allowed"(price > Bid && price < Ask )
I told him: Button pressed - create line, button released - delete (same with other types of objects that can be attached to). But he said: it's nothing, I'll do it properly. :)
Do you mean the colour change via property? I have such an option, I need to understand why it doesn't work.
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.
Yes indeed as much as 8 pieces, but the chart does not show that the price is 0 does not matter, the line still clings to the cursor (follows it)
Don't use ObjectDelete because the line runs away to "0" every time
betterObjectSetString(0,"line 1",OBJPROP_NAME,line_name); ObjectSetInteger(0,line_name,OBJPROP_COLOR,clrRed);Don't use ObjectDelete because the line runs away to "0" every time
better0 means false. Anything not 0 istrue. But has anyone thought about readability of such code, where all kinds of conditions are mixed?
It is not a boolean value. But it can be easily turned into a boolean:
So the main thing is to have the right approach to code writing. Then you willnever have such problems.
I have the renaming option and yes it works. In the case of ObjectDelete() why green and red lines are created in one instance and don't blink? And yellow line, if it already has one, why does it keep multiplying infinitely?
These lines are in your control.
And the lines that flicker react to any OnChartEvent, because
0 means false. Anything not 0 istrue. But has anyone thought about readability of such code, where all kinds of conditions are mixed?
It is not a boolean value. But it can be easily turned into a boolean:
So the main thing is to have the right approach to code writing. Then you willnever have such problems.
And if the object is "0" in the main window, it will return false?
And the lines that flicker react to any OnChartEvent, because.
I told him: Button pressed - create line, button released - delete (same with other types of objects that can be linked to). But he said: it's nothing, I'll do everything "normally". :)
And if the object is "0" in the main window, it will return false?
That's what can defeat your reluctance to read the documentation!
https://www.mql5.com/ru/docs/objects/objectfind
https://docs.mql4.com/ru/objects/objectfind
Return value
If successful, the function returns the number of the subwindow (0 means main chart window) where the found object is located. If no object is found, the function returns a negative number. To get more information aboutthe error, callGetLastError() function.
These lines are in your control.
And the lines that flicker react to any OnChartEvent, because
And if the object is "0" in the main window, will it return false?
I told him: Button pressed - create line, button released - delete (same with other types of objects that can be attached to). But he said: it's nothing, I'll do it properly. :)
Do you mean the colour change via property? I have such an option, I need to understand why it doesn't work.
Here's something that might defeat your unwillingness to read the documentation?!
https://www.mql5.com/ru/docs/objects/objectfind
https://docs.mql4.com/ru/objects/objectfind