How to use Array in struct table New comment Dejan Krapez 2021.12.03 08:31 struct tradeTable { double entryPrice; }Order[]; int OnInit() { // int i; // Order s_Array[i]; for (int i = 0 /*Note: Array index is zero-based, 0 is first*/; i <= 1000000000; i++) { Order[i] = 2; //iHigh(NULL, 0, i); // or // Order[i] = 1; //High[i]; } // Order[0].entryPrice=3; // Print("Order:"Order.entryPrice); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- } //+------------------------------------------------------------------+ Dominik Egert 2021.12.03 08:43 #1 You need to add a assignment operator to your struct.Take a look at:https://www.mql5.com/en/docs/basis/function/operationoverload William Roeder 2021.12.03 13:45 #2 or just assign the members directly Order[i].entryPrice = 2; New comment