I have a button on a dialog box, and I want to Use Button.Pressed() to detect when this button is pressed, and this will trigger an action. The thing is that CHARTEVENT_CLICK is also triggered, so another action is also triggered in the same time. How can I press that button without CHARTEVENTCLICK to be triggered? So just to understand better, I have seen this ideea in one trading assitant which I want to use. So I have this button which I press to allow trades, and then when I click somewhere on the chart, the order should open. And that last click will be actually the SL price also. Presently when I press the button, the order is also opened, so CHARTEVENT_CLICK is also triggered. This I want to avoid. Thanks
This is what I have know. I managed to make it work, with that _count param:
I think you could do this
//i assume you are passing events to the dialogif(TradeAllow.Pressed()){
tradeallow=true;
TradeAllow.ColorBackground(clrMagenta);
TradeAllow.Text(" OPENING ");
return;
}
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.
Hi guys! I hav' another question:
I have a button on a dialog box, and I want to Use Button.Pressed() to detect when this button is pressed, and this will trigger an action. The thing is that CHARTEVENT_CLICK is also triggered, so another action is also triggered in the same time. How can I press that button without CHARTEVENTCLICK to be triggered? So just to understand better, I have seen this ideea in one trading assitant which I want to use. So I have this button which I press to allow trades, and then when I click somewhere on the chart, the order should open. And that last click will be actually the SL price also. Presently when I press the button, the order is also opened, so CHARTEVENT_CLICK is also triggered. This I want to avoid. Thanks
This is what I have know. I managed to make it work, with that _count param:
I think you could do this
I think you could do this