Vladimir Pastushak: You have pressed "hare" button, you press "wolf" button in your array of 2 pressed buttons ... How do you release the "hare" button ???
Find out in the saved state array the state of all buttons. Unclick the one that was pressed before and save the state of the one that is pressed now. ;)
Vladimir Pastushak: You have the "hare" button pressed, you press the "wolf" button in your array of 2 pressed buttons ... How do you push the "hare" button?
Again, the code reaches the "hare" button, applies obectSetInteger() and pushes the other buttons, including the "wolf" button that was pressed last.
I tend to think that to understand the essence of the problem it is necessary to write the code and see what exactly the problem is. Otherwise, not understanding the essence of the problem will not help.
This thread was created in the hope to get an answer from those who have already encountered a similar problem...
Find out in the saved state array the state of all buttons. Unclick the one that was pressed before and save the state of the one that is pressed now. ;)
Again, the code reaches the "hare" button, applies obectSetInteger() and pushes the other buttons, including the "wolf" button which was pressed last.
I tend to think that to understand the essence of the problem it is necessary to write code and see what exactly the problem is. Otherwise, not understanding the essence of the problem will not help.
The topic was created in the hope of getting an answer from those who have already encountered a similar problem...
Why face the problem if the problem is solved easily and without problems in one or two or three?
Vladimir Pastushak: In this article the definition goes with OnChartEvent in the tester won't work that way... You need a solution without using OnChartEvent
You just answered yourself that it doesn't matter where it all runs. Actually it really doesn't make any difference.
Vladimir Pastushak: In this article the definition goes with OnChartEvent in the tester won't work that way... Need a solution without using OnChartEvent
It doesn't matter where. The basic principle is the same. You can see an example of saving button states there.
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.
Four pages trying to ask one question:
Where does it all go? In the ontic by tick function, or in the ontimer, or where? Where do you callObjectGetInteger() to know ifa button is pressed?
Once you reach 50, there will be no pushback, because this pushing has already been recorded in the array.
You have pressed "hare" button, you press "wolf" button in your array of 2 pressed buttons ... How do you release the "hare" button ???
Find out in the saved state array the state of all buttons. Unclick the one that was pressed before and save the state of the one that is pressed now. ;)
Example:
MQL5 Recipes - Controls in Indicator Subwindow - Buttons >>>
You have the "hare" button pressed, you press the "wolf" button in your array of 2 pressed buttons ... How do you push the "hare" button?
One way obectSetInteger()
Again, the code reaches the "hare" button, applies obectSetInteger() and pushes the other buttons, including the "wolf" button that was pressed last.
I tend to think that to understand the essence of the problem it is necessary to write the code and see what exactly the problem is. Otherwise, not understanding the essence of the problem will not help.
This thread was created in the hope to get an answer from those who have already encountered a similar problem...
Find out in the saved state array the state of all buttons. Unclick the one that was pressed before and save the state of the one that is pressed now. ;)
Example:
MQL5 Recipes - Controls in Indicator Subwindow - Buttons >>>
Again, the code reaches the "hare" button, applies obectSetInteger() and pushes the other buttons, including the "wolf" button which was pressed last.
I tend to think that to understand the essence of the problem it is necessary to write code and see what exactly the problem is. Otherwise, not understanding the essence of the problem will not help.
The topic was created in the hope of getting an answer from those who have already encountered a similar problem...
In this article the definition goes with OnChartEvent in the tester won't work that way... You need a solution without using OnChartEvent
In this article the definition goes with OnChartEvent in the tester won't work that way... Need a solution without using OnChartEvent