Hi, I'm trying to get a Nested IFF statement to work with a "string" output eg A,B,C etc instead on a numeric code eg 1,2,,3 etc. The code below runs ok if the output is numeric but not if it's a string. (it generates an output but ignores the whole Nested IFF conditions. There are No compile errors with AFL with the 'string' output which is most confusing. Any ideas to fix this. Thanks
Filter = 1;
// MFI is Money Flow Index
iMFI = MFI(14);
ModiMFI = IIf(iMFI > 4.12 AND iMFI <= 18.17,'A',
IIf(iMFI > 18.17 AND iMFI <= 26.85,'B',
IIf(iMFI > 26.85 AND iMFI <= 36.42,'C',
IIf(iMFI > 36.42 AND iMFI <= 44.9,'D',
IIf(iMFI > 44.9 AND iMFI <= 53.17,'E',
IIf(iMFI > 53.17 AND iMFI <= 61.3,'F',
IIf(iMFI > 61.3 AND iMFI <= 68.24,'G',
IIf(iMFI > 68.24 AND iMFI <= 73.6,'H',
IIf(iMFI > 73.6 AND iMFI <= 79.58,'I',
IIf(iMFI > 79.58,'J','A'))))))))));