Trade Panel - page 2

 
Daniel Cioca #:

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 assume you are passing events to the dialog
if(TradeAllow.Pressed()){
          tradeallow=true;
         TradeAllow.ColorBackground(clrMagenta);
         TradeAllow.Text(" OPENING ");
return;
}
 
Lorentzos Roussos #:

I think you could do this 

Thanks! But is the same, only eliminating few lines… chartevent still triggering other actions which I don’t want