How to use a bool as parameter
Created at 05 Mar 2013, 18:37
How to use a bool as parameter
05 Mar 2013, 18:37
I tried this :
[Parameter("Use Trade Time ?", DefaultValue = false)] public bool UseTradeTime { get; set; }
I got a succesfull compilation but an error message too :
"Unable to load assembly : Unsupported parameter type 'boolean' "
Replies
cAlgo_Development
26 Jun 2013, 12:31
Boolean type parameters are supported in last release:
[Parameter("Use Stop Loss", DefaultValue = true)] public bool UseStopLoss { get; set; }
@cAlgo_Development
TraderM
05 Mar 2013, 22:09
RE:
Hi,
from what I have read I don't think you can use a boolean as a parameter.
To solve this I use an integer and set it to 1 or 0 (to represent true and false).
I would rather use a boolean as the user would be restricted as to what input they can enter, and the programming is neater. But as the user is me and I know not to enter a different value it works.
TraderM
@TraderM