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
Yes? But somewhere you callObjectGetInteger() to find out if the button is clicked?
Of course, if the button with the name "Hare" is pressed, then draw the hare, and if the button with the name "Wolf" is pressed, then the hare must be removed and the wolf must be drawn, except that if we do not release the button with the name "Hare", we will have to draw and remove the hare...
Who will draw it? You are not using ChartEvent().
OBJ_BUTTON will draw buttons...
OBJ_BUTTON
The "Button" object
OBJ_BUTTON will draw buttons...
OBJ_BUTTON
The "Button" object
Who's going to draw the bunny?
You've got to be kidding )))) It doesn't matter what happens if the button is pressed, what matters is how the other buttons are pressed...
Squeeze throughObjectSetInteger()
It won't work ...
Press viaObjectSetInteger().
The code for the "hare" button comes first in the code, the code for the "wolf" button comes second.
If the "hare" button is pressed, we press the "wolf" button.
Further on by logic
If the "hare" button is pressed, we click the "wolf" button,
The code is executed from the beginning and the first thing executed is the "wolf" button, i.e. no matter how or how many times we click, if the "hare" button is pressed, the "wolf" button will always be pressed...
The code for the "hare" button comes first in the code, the code for the "wolf" button comes second.
If the "hare" button is pressed, then we press the "wolf" button.
Further by logic
If the "hare" button is pressed, we press the "wolf" button with the mouse,
The code is executed from the beginning and the first thing that happens is that the wolf button is pressed, which means that no matter how many times we click, if the hare button is pressed, the wolf button will always be pressed...
Remember the previous state of buttons, then you will know which one is just pressed, and which one was pressed a long time ago.