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
No way, it's not that simple, the button whose code is above will always push those buttons whose code is below...
That is, if we press the button whose code is above and then press the button whose code is below, the state of the first button will always press the last ...
It's a lot simpler, really. I don't see any problem or difficulty at all.
What are the buttons above?
When using OnChartEvent() the button's pressed can be determined by the button's name and then proceed as you suggested above, push buttons with other names, but this won't work in the tester...
How do you manage to callObjectGetInteger() to know if the button is pressed?
Like this
bool tmp=false;
ObjectGetInteger(0, "name",OBJPROP_STATE,0,tmp);What's that by the name? How about this? It's not a click, it's an event. And the status is determined byObjectGetInteger().
Are you kidding me or are you serious?
You have your own cycle there. So you need an array of button states. We are constantly going through all of this, and if the button state does not match the state from the array, this is our event. Now we do what we want, we have both buttons and the array.
No. I'm actually horrified.
There are no loops, just 10 buttons drawn... No loops, no arrays, no structures... It's all procedural...
How is that by name? What about it? It's not a click, it's an event. And the state is defined viaObjectGetInteger().
Mouse click event on graphical object
CHARTEVENT_OBJECT_CLICK
X coordinate
Y coordinate
Name of the graphical object where the event occurred