Is it possible to draw buttons on chart with the new MT4 update

 
Hello, is it now possible to draw buttons on chart wich can be use for trading with the new MQL4 update?
 
PlanandTrade:
Hello, is it now possible to draw buttons on chart wich can be use for trading with the new MQL4 update?
Try it and find out . . .
 
PlanandTrade:
Hello, is it now possible to draw buttons on chart wich can be use for trading with the new MQL4 update?
Yes it's possible but only with mql4 code, not directly with MT4. See help file (F1).
 
angevoyageur:
Yes it's possible but only with mql4 code, not directly with MT4. See help file (F1).


Wich functions must be use to make that?
 
PlanandTrade:

Wich functions must be use to make that?

ObjectCreate

The function creates an object with the specified name, type, and the initial coordinates in the specified chart subwindow of the specified chart. There are two variants of the function:


OBJ_LABEL

Label

OBJ_BUTTON

Button

OBJ_BITMAP

Bitmap


OBJ_BUTTON

Button object.


Note

Anchor point coordinates are set in pixels. You can select button anchoring corner from ENUM_BASE_CORNER.

Example

The following script creates and moves Button object on the chart. Special functions have been developed to create and change graphical object's properties. You can use these functions "as is" in your own applications.


 

I did use now a example for draw the buttonfrom the MQL4 Reference book.

I am asking now myself how i can get a info in the code abouth a click on the button, wich functions must be use to receive a button click?

 
PlanandTrade:

I did use now a example for draw the buttonfrom the MQL4 Reference book.

I am asking now myself how i can get a info in the code abouth a click on the button, wich functions must be use to receive a button click?

You use OnChartEvent() and CHARTEVENT_OBJECT_CLICK
 

Can you give a code example, for me as mql4 coder this new codes looks strange.

i have a button now on my chart...but i dont find easy to understand exampels for using OnChartEvent() function.

 
PlanandTrade:

Can you give a code example, for me as mql4 coder this new codes looks strange.

i have a button now on my chart...but i dont find easy to understand exampels for using OnChartEvent() function.

No I can't . . . spend some time, figure it out then post your code to help others . . .
 

The button is an interesting object, but it was not an answer to my question.

What i need is the time of the most left candle that is actually visible.

 
SemperAugustus:

The button is an interesting object, but it was not an answer to my question.

What i need is the time of the most left candle that is actually visible.

OK, but this thread is about "Is it possible to draw buttons on chart with the new MT4 update" . . .
Reason: