Use Ticket Number in Combo box

To add comments, please log in or register
amando
2979
amando  

Hello,

 

does anyone have an idea, how to bring the ticket number into a combo box?

i have several pending orders, and want to bring them into a combo box

 

any code idea? want to use the defalt combo box


 https://www.mql5.com/en/docs/standardlibrary/controls/ccombobox

 i read the documentation, and really, i dont have any idea how to creat this box 

 

amando 

Documentation on MQL5: Standard Library / Panels and Dialogs / CComboBox
Documentation on MQL5: Standard Library / Panels and Dialogs / CComboBox
  • www.mql5.com
Standard Library / Panels and Dialogs / CComboBox - Reference on algorithmic/automated trading language for MetaTrader 5
amando
2979
amando  

deas anyone can help?

the main problem is, how to create the combo box

 

amando 

amando
2979
amando  

is there a possibillity to use a combo box in an expert? i always see only samples with indicators

 

 

amando 

Alain Verleyen
40731
Alain Verleyen  
amando:

is there a possibillity to use a combo box in an expert? i always see only samples with indicators

 

 

amando 

Of course, why not ?
Fernando Carreiro
5098
Fernando Carreiro  
amando: does anyone have an idea, how to bring the ticket number into a combo box?

i have several pending orders, and want to bring them into a combo box

any code idea? want to use the defalt combo box

https://www.mql5.com/en/docs/standardlibrary/controls/ccombobox

i read the documentation, and really, i dont have any idea how to creat this box

amando 

  1. You read the Tick Number from the Order History
  2. You add each Ticket using the class method "AddItem".

Obviously, you must first learn to code in general and learn about OOP - Object Oriented Programming. Otherwise you will not be able to understand it, much less code it!

amando
2979
amando  
Fernando Carreiro:
  1. You read the Tick Number from the Order History
  2. You add each Ticket using the class method "AddItem".

Obviously, you must first learn to code in general and learn about OOP - Object Oriented Programming. Otherwise you will not be able to understand it, much less code it!

you are right, bcs i come from the visual basic world ;-)

but neverless, do you haven an example for me?

i have my buttons and text fields, this was no problem for coding, but i dont know how to implement the combobox

 

amando 

amando
2979
amando  
Alain Verleyen:
Of course, why not ?

Hello Alain,

 

do you haven an example?

i tried to use this code, but its not work in my EA

https://www.mql5.com/en/forum/37432

 

amando 

How to create a ComboBox object in an indicator subwindow?
How to create a ComboBox object in an indicator subwindow?
  • www.mql5.com
I created a ComboBox object in an indicator subwindow(by the code attached), But when I click the drop-down arrow next to the control, nothing was pop out.
Fernando Carreiro
5098
Fernando Carreiro  
amando: you are right, bcs i come from the visual basic world ;-) but neverless, do you haven an example for me?

i have my buttons and text fields, this was no problem for coding, but i dont know how to implement the combobox

I don't have an example, but you yourself have referenced the documentation as well as a Forum thread with an example, and yet you could not do it.

You are missing the point. You have to first learn OOP, because once you do you will not need an example.

You need to to learn C and C++ to better understand coding in MQL, especially if you come form an Visual Basic background!

There is no way around this. It is part of the learning curve if you want to code and understand MQL properly.

amando
2979
amando  

does anyone tell me how it works?

 

amando 

Alain Verleyen
40731
Alain Verleyen  
amando:

Hello Alain,

 

do you haven an example?

i tried to use this code, but its not work in my EA

https://www.mql5.com/en/forum/37432

 

amando 

There is plenty of examples in the Codebase, Articles and even on the Forum. You just have to search a bit.

I don't think someone will do it for you.

James Hodges
4016
James Hodges  
I also have been unable to find a good example of using the CCombobox class in an expert. Not in any articles blog posts or code. I can use one in an indicator as Amando mentioned but have been unable to get one to work properly in an Expert thus far. If anyone has a code example of it. please include it... I hardly am finding "plenty of examples in the Codebase".. Just one would suffice. 
To add comments, please log in or register