How to create an Array on MQL5 that can hold 3 variablesand how to fill it and how to call it? Please see the picture https://i.imgur.com/VyjmwNW.jpg [![array][1]][1]
After nicholishen Answer when i try to Initialize array useing Variables i get the follwing error : 'hi' - constant expression required 22.mq5 16 18
void OnStart()
{
struct MyData { string name; double price; int volume; };
// initializing an array of structs
double hi= 0.01;
MyData arr[] = {
{"USDJPY", hi, 200},
{"USDJPY", 110.100, 300},
{"USDJPY", 110.200, 400},
};
}
int array[][3];
then add more elements by usingArrayResize
function - it is well documented so please show what you did and why it does not work so that we will try to help you wiht your code. – Daniel Kniaz