CButton, Click to open indicator properties

 

Hello,

I coded an custom indicator which is already on the chart and working. I also coded a button (contains to that indicator) which should open the indicators properties when I click on that button. The button itself works fine (I tested him with Print()).

I only need to know the function, method or what else to tell the button to open that indicators properties. Like I have the Bollinger Bands on the chart an double klick one of the bands opens me the bands properties. The same behaviour I like to code for the button.

Thanks a lot for help community!

 

No need to create a button, you just double click at any custom indicator line, it 'll pop up the property window for you.

 
apirakkamjan:

No need to create a button, you just double click at any custom indicator line, it 'll pop up the property window for you.

Yes I know, but my custom indicator draws no lines from buffers. It draws just graphical objects as informations like time, candlesize etc. So there's no line to click on, just graphical objects like a button or so.

 

Ctrl + I or Right click > Properties ? 

Try OnChartEvent()  on OBJ_EDIT

You can edit value on the chart directly and code anything when that happens..

id = CHARTEVENT_OBJECT_ENDEDIT

 
apirakkamjan:

Ctrl + I or Right click > Properties ? 

Try OnChartEvent()  on OBJ_EDIT

You can edit value on the chart directly and code anything when that happens..

id = CHARTEVENT_OBJECT_ENDEDIT

What I cannot undestand is, there is a command/function to find a certain indicator on a chart, but there is no command/function to open that indicator?

 
Dan: What I cannot undestand is, there is a command/function to find a certain indicator on a chart, but there is no command/function to open that indicator?

There is a command to open a list. The command to open that indicator is: double click to open that indicator's preferences, or single click to select and press edit. What don't you understand?

 
William Roeder:

There is a command to open a list. The command to open that indicator is: double click to open that indicator's preferences, or single click to select and press edit. What don't you understand?

That's the way I solved it until now. I coded the following behaviour when klicking the button (using the keybd_event):

virtually press STRG+I to open the indicators list, press the arrow key, press TAB and ENTER to open the certain indicator. That works fine, but I'm still surprised if there's something similar to WindowFind () to find a certain indicator on the chart and open the properties?

 
Dan #:

That's the way I solved it until now. I coded the following behaviour when klicking the button (using the keybd_event):

virtually press STRG+I to open the indicators list, press the arrow key, press TAB and ENTER to open the certain indicator. That works fine, but I'm still surprised if there's something similar to WindowFind () to find a certain indicator on the chart and open the properties?

Yes, there should be a way to do that actually, to make it easier for the users but there isn't. I'll try to find something and comment once I do.

 
Dan #:

That's the way I solved it until now. I coded the following behaviour when klicking the button (using the keybd_event):

virtually press STRG+I to open the indicators list, press the arrow key, press TAB and ENTER to open the certain indicator. That works fine, but I'm still surprised if there's something similar to WindowFind () to find a certain indicator on the chart and open the properties?

Okay, so there is a way. Create a fake button + (arrow icon behind the button with a buffer value), and once you double click that button, it will open the indicator settings directly. You will actually be pressing the buffer arrow instead of the button.

 
William Roeder #:
nd to

by SHORTCUT we mean a set of keyboards commands so we dont have to use the mouse

 
douglas14 #:

by SHORTCUT we mean a set of keyboards commands so we dont have to use the mouse

by the way just found it! It is F7 !!

Reason: