- ago
The AddParameter function requires as second Parameter a type of ParameterTypes. If I choose in Strategies for example ParameterTypes.StringChoice I get an cast error opening the strategy in the UI. Sure, because it tries to assign the default values which are of type double. Does this mean that I have to do the cast by myself or in other words, not all values of the ParameterTypes enum are allowed in StrategyBase.AddParameter?
0
963
1 Replies

Reply

Bookmark

Sort
- ago
#1
QUOTE:
Does this mean that I have to do the cast by myself or in other words, not all values of the ParameterTypes enum are allowed in StrategyBase.AddParameter?

Exactly. In C# Coded Strategies, parameters are used to optimize a Strategy. So for them to stay compatible with the optimizer, their type has to be an integer or double.
0

Reply

Bookmark

Sort