Multiple values for an external Parameter.

 

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.

 
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.

 
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;

 
Fernando Morales:

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

Thank you, Fernando. Worked just fine.

 
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?"

 
Keith Watford:

I guess that I misunderstood your inquiry and thought that you wanted to input multiples 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?"

That's correct. I already figured out. Thank you for the clarification.

Reason: