Multiple Data Types in Multi Dimensional Array

 
    int orderstotal = OrdersTotal();
    int orders = 0;
    int ordticket[30][2];
    ArrayResize(ordticket,30,30); 
    for (int i = 0; i < orderstotal; i++)
    {
        if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES)==true){
        if (OrderType() != OP_BUY || OrderSymbol() != Symbol() || OrderMagicNumber() != MagicX)
        {
            continue;
        }
        ordticket[orders][0] = OrderOpenTime();
        ordticket[orders][1] = OrderTicket();
        orders++;
        }
    }

//Possible loss of data due to type conversion:  ordticket[orders][0] = OrderOpenTime()

How to solve "Possible loss of data due to type conversion"?

T‌hanks for the help.

 
ordticket[orders][0] = (int)OrderOpenTime()


 
Keith Watford:
ordticket[orders][0] = (int)OrderOpenTime()



Thank you, it solved the issue.
 

If you are using multiple data types in an array, you may want to explore structures.

Structures, Classes and Interfaces - Data Types - Language Basics - MQL4 Reference
Structures, Classes and Interfaces - Data Types - Language Basics - MQL4 Reference
  • docs.mql4.com
Structures, Classes and Interfaces - Data Types - Language Basics - MQL4 Reference
 
Yep, use a single dimension array of a structure. See Sort multiple arrays - MQL4 and MetaTrader 4 - MQL4 programming forum
Reason: