Multiple values for an external Parameter.

To add comments, please log in or register
Julio Guerra
274
Julio Guerra  

What code could be used to place multiples values in one external parameter?

 Multiple values for an external Parameter.

This is what I know for a single value:

external bool Timeframe = true; or false;

But how to put several values in one tab.

Thanks in advance.  I will appreciate any help.

Keith Watford
Moderator
15742
Keith Watford  
Julio Guerra:

What code could be used to place multiples values in one external parameter?

 

This is what I know for a single value:

external bool Timeframe = true; or false;

But how to put several values in one tab.

Thanks in advance.  I will appreciate any help.

You could input them as a string separated by commas. Then use StringSplit to place the values in an array. Then convert them to the correct values (ie Int) into another array.

Fernando Morales
1100
Fernando Morales  
Julio Guerra:

What code could be used to place multiples values in one external parameter?

 

This is what I know for a single value:

external bool Timeframe = true; or false;

But how to put several values in one tab.

Thanks in advance.  I will appreciate any help.

You get that dropbox by using ENUM as variable type like for example

sinput ENUM_TIMEFRAMES myTF = PERIOD_M5; sinput ENUM_MA_METHOD MAmetohd = MODE_EMA; sinput color LineColor = clrYellow;

enum LANGUAGE { English, Español, Russian }; sinput LANGUAGE EA_Lang = English;

Julio Guerra
274
Julio Guerra  
Fernando Morales:

You get that dropbox by using ENUM as variable type like for example

Thank you, Fernando. Worked just fine.

Keith Watford
Moderator
15742
Keith Watford  
Keith Watford:

You could input them as a string separated by commas. Then use StringSplit to place the values in an array. Then convert them to the correct values (ie Int) into another array.

I guess that I misunderstood your enquiry and thought that you wanted to input muliples in one line, ie inputting 3 different time-frames to be checked.

Maybe instead of 

"What code could be used to place multiples values in one external parameter?"

you could have written

"What code could be used to place multiples choices/options in one external parameter?"

To add comments, please log in or register