Download MetaTrader 5

how to set array as input?

To add comments, please log in or register
Eck369 2016.08.02 16:30 

 Hi all,

may i know is it possible to key in the input as array style?

 In my ea, i wrote like orange highlighted as below: 

extern double array[]; 

but i get the error message: 

'array' - objects and arrays are not allowed as inputs.


Need advice. thanks in advance.

Carl Schreiber
Carl Schreiber 2016.08.02 16:55  

You can't!

Either give value by value or prepare a csv-file to read within OnInit().

whroeder1 2016.08.02 19:05  
or option 3, use a string variable with separated values, parse the string in init into an array of proper type and use that. StringSplit - String Functions - MQL4 Reference
Eck369 2016.08.03 06:22  

oops, >.<.

thanks guys... :)

To add comments, please log in or register