|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello Everyone!
I am trying to understand how to programme arrays in MQL4. Can you please let me know if my interpretations are correct? Code:
int data_z[51]; Code:
int data_x[][6]; Many thanks, |
|
|||
|
Hello Ralph!
Thank you very much for your reply! So if my understanding is correct, Code:
int data_z[51]; 0 . . . 50 and Code:
int x = 2 ; int data_x[x][6]; 0 0 1 1 2 2 3 3 4 4 5 5 ? |
|
||||
|
The first is right. The first element has index 0, second index 1, and so forth, with each n:th element having index n-1, up to the 51:st element.
The second is probably right thinking as well, assuming there is an invisible column heading of "0" for the first column and "1" for the second column. It's a fair enough interpretation to think of the first index as telling which column to look in, and the second index as telling which row (of that column). |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Welcome to the MQL4 course | codersguru | Metatrader 4 mql 4 - Development course | 84 | 05-18-2008 05:59 PM |
| Using Arrays to track info for All Open Orders | deeforex | Questions | 6 | 09-12-2006 06:01 PM |
| www.mql4.com | DeSt | Metatrader 4 | 18 | 02-01-2006 11:59 PM |