I have a strange behaviour in using the String-function StartsWith.
I save the Instrument.FullName in a String variable:
private String futureCode = null;
futureCode = Instrument.FullName;
print ("futureCode.StartsWith(CL) = " = futureCode.StartsWith("CL")); if (futureCode.StartsWith("CL) && (<secondCondition> || <thirdCondition>)) { ... }
Are there any issues with String and StartsWith? I use this very often and in other places in my strategy it works without a problem.
Is there a better, recommended way to select the correct instrument?
DT
Comment