Having a hard time figuring out why my values are not being assigned to the variables in the case statement.
I am fairly sure that the syntax is correct after checking other uses of case...
Any help pointing me in the right direction would be very appreciated.
I am fairly sure that the syntax is correct after checking other uses of case...
Any help pointing me in the right direction would be very appreciated.
Rich (BB code):
input EnhancedLong = {default BasicLong, SimpleLong, AggressiveLong};
input EnhancedShort = {default BasicShort, SimpleShort, AggressiveShort};
def trLong;
switch (EnhancedLong) {
case BasicLong:
trLong = TrendPeriods() == 1;
case SimpleLong:
trLong = TrendQuality().TQ[0] > TrendQuality().TQ[1] or TrendQuality().TQ >= 0;
case AggressiveLong:
trLong = TrendQuality().TQ[0] > TrendQuality().TQ[1] and TrendQuality().TQ[1] > TrendQuality().TQ[2];
}
def trShort;
switch (EnhancedShort) {
case BasicShort:
trShort = TrendPeriods() == 1;
case SimpleShort:
trShort = TrendQuality().TQ[0] > TrendQuality().TQ[1] or TrendQuality().TQ >= 0;
case AggressiveShort:
trShort = TrendQuality().TQ[0] > TrendQuality().TQ[1] and TrendQuality().TQ[1] > TrendQuality().TQ[2];
}