Is posible number array in parameter?
Created at 17 May 2019, 15:38
LU
Is posible number array in parameter?
17 May 2019, 15:38
Hi
i need set hours acepted for trading by user.
i try make array in parameters:
[Parameter("acepted trade hours? (1,2,..)", DefaultValue = "14,2,8")] public int[] AceptedHours { get; set; }
and check if current hour is iclude in array
int CurrentHour = Time.Hour; if (AceptedHours.Contains(CurrentHour)) { Print("Its ok... now is " + CurrentHour+ "h "); }
but cTrader write me error "unsuported parameter type int32[]
where is problem? is posible use array in parametr?
Thanks Lukas
Replies
lukas.ourada
17 May 2019, 16:11
RE:
Panagiotis Charalampous said:
Hi Lukas,
It is not possible to have an array as an input parameter. You can get the values as string and use string.Split() to make the separation into an array.
Best Regards,
Panagiotis
ok thank you
i try it
@lukas.ourada
PanagiotisCharalampous
17 May 2019, 15:48
Hi Lukas,
It is not possible to have an array as an input parameter. You can get the values as string and use string.Split() to make the separation into an array.
Best Regards,
Panagiotis
@PanagiotisCharalampous