Download MetaTrader 5

how to set array as input?

To add comments, please log in or register
Eck369
25
Eck369  

 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
6791
Carl Schreiber  

You can't!

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

whroeder1
15053
whroeder1  
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
25
Eck369  

oops, >.<.

thanks guys... :)

To add comments, please log in or register