(MQL5) How to show All Ticket in Combobox?
(MQL5) How to show All Ticket in Combobox?
Loading saved threads...
Dominiz X · External communityPost link
External question — Stack Overflow Stack Exchange
Author: Dominiz X
Original post: https://stackoverflow.com/questions/77364723
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
How to show All Ticket in Combobox?
i opened 3 order buy EA only show one-order in Combobox.
m_combobox_box.ItemsClear(); ////When i remove it all order show, but collect endless!
void CControlsDialog::Update(void){
//Print(__FUNCTION__);
//int ticketread1 = 9999;
for(int i = PositionsTotal() - 1; i >= 0; i--) {
long ticket = PositionGetTicket(i);
if(ticket>0){
PositionSelectByTicket(ticket);
ENUM_POSITION_TYPE posType = PositionGetInteger(POSITION_TYPE);
//Print(EnumToString(posType) + " : " + (string)ticketRead);
Print((string)ticket);
m_combobox_box.ItemsClear(); ////When i remove it all order show, but collect endless items.
m_combobox_box.ItemAdd(ticket);
}
}
(
https://i.sstatic.net/Df9rd.png
)
after remove .ItemsClear
how to fix this problem.
Quote
Report
Mark SdS · External communityPost link
External answer — Stack Overflow Stack Exchange
Author: Mark SdS
Original post: https://stackoverflow.com/a/77371843
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Have you tried placing the
m_combobox_box.ItemsClear();
before the iteration?
m_combobox_box.ItemsClear();
for(int i = PositionsTotal() - 1; i >= 0; i--) { ... }
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External question — Stack Overflow Stack Exchange Author: Dominiz X Source score (net votes, not local likes): -1 Original post: https://stackoverflow.com/questions/77364723 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. How to show All Ticket in Combobox? i opened 3 order buy EA only show one-order in Combobox. m_combobox_box.ItemsClear(); ////When i remove it all order show, but collect endless! void CControlsDialog::Update(void){ //Print(__FUNCTION__); //int ticketread1 = 9999; for(int i = PositionsTotal() - 1; i >= 0; i--) { long ticket = PositionGetTicket(i); if(ticket>0){ PositionSelectByTicket(ticket); ENUM_POSITION_TYPE posType = PositionGetInteger(POSITION_TYPE); //Print(EnumToString(posType) + " : " + (string)ticketRead); Print((string)ticket); m_combobox_box.ItemsClear(); ////When i remove it all order show, but collect endless items. m_combobox_box.ItemAdd(ticket); } } ( https://i.sstatic.net/Df9rd.png ) after remove .ItemsClear how to fix this problem.
Checking account access…