Download MetaTrader 5

Working with a 2-dimensional MqlRates Array

To add comments, please log in or register
Martin Meinke
204
Martin Meinke  

To keep it short and simple,

can anybody tell me what is wrong with this code and how to fix it?

 

I want to store the past 100 Rates for various symbols in a 2-Dimensional Array structure.

It keeps telling me "wrong dimension" at line 3 

MqlRates barWindow[][100];
ArrayResize(barWindow, 3);
CopyRates(_Symbol,_Period,0,100,barWindow[0]);
phi nuts
2184
phi nuts  
martinm:

To keep it short and simple,

can anybody tell me what is wrong with this code and how to fix it?

 

I want to store the past 100 Rates for various symbols in a 2-Dimensional Array structure.

It keeps telling me "wrong dimension" at line 3 

Use example like this one https://www.mql5.com/en/docs/constants/structures/mqlrates
Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / History Data Structure
Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / History Data Structure
  • www.mql5.com
Standard Constants, Enumerations and Structures / Data Structures / History Data Structure - Documentation on MQL5
To add comments, please log in or register