try this Length = ParamList("Regression Length", "Long|Mid|Short");
ROCfactor = IIf(Length == "Long", 1.5, IIf(Length == "Mid", 2, IIf(Length == "Short", 3,0))); ERfactor = IIf(Length == "Long", 1.25, IIf(Length == "Mid", 2.5,IIf(Length == "Short", 4,0))); -- Cheers Graham AB-Write >< Professional AFL Writing Service Yes, I write AFL code to your requirements http://e-wire.net.au/~eb_kavan/ab_write.htm On 4/19/06, cstrader232 <[EMAIL PROTECTED]> wrote: > > I don't think you're using IIF correctly. You might try something like > this: > > > > Length = ParamList("Regression Length", "Long|Mid|Short"); > > > ROCFactor = IIf(Length == "Long", 1.5, 0); > > ROCFactor = IIf(Length == "Mid", 2, ROCfactor); > > ROCFactor = IIf(Length == "Short", 3, ROCFactor); > > ERFactor = IIf(Length == "Long", 1.25, 0); > > ERFactor = IIf(Length == "Mid", 2.5, ERFactor); > > ERFactor = IIf(Length == "Short", 4, ERFactor); > > ----- Original Message ----- > From: timgadd > To: amibroker@yahoogroups.com > Sent: Tuesday, April 18, 2006 9:50 PM > Subject: [amibroker] Problem w/ nested IIf > > Can someone PLEASE tell me why the following always returns 3 for > ROCfactor and 4 for ERfactor regardless of which ParamList choice is > selected from Parameters on the AA controls? tia > > Length = ParamList("Regression Length", "Long|Mid|Short"); > > IIf(Length == "Long", ROCfactor = 1.5, IIf(Length == "Mid", ROCfactor > = 2, IIf(Length == "Short", ROCfactor = 3,0))); > IIf(Length == "Long", ERfactor = 1.25, IIf(Length == "Mid", ERfactor = > 2.5,IIf(Length == "Short", ERfactor = 4,0))); > > > > > > > ----- Original Message ----- > From: timgadd > To: amibroker@yahoogroups.com > Sent: Tuesday, April 18, 2006 9:50 PM > Subject: [amibroker] Problem w/ nested IIf > > Can someone PLEASE tell me why the following always returns 3 for > ROCfactor and 4 for ERfactor regardless of which ParamList choice is > selected from Parameters on the AA controls? tia > > Length = ParamList("Regression Length", "Long|Mid|Short"); > > IIf(Length == "Long", ROCfactor = 1.5, IIf(Length == "Mid", ROCfactor > = 2, IIf(Length == "Short", ROCfactor = 3,0))); > IIf(Length == "Long", ERfactor = 1.25, IIf(Length == "Mid", ERfactor = > 2.5,IIf(Length == "Short", ERfactor = 4,0))); > > > > > > > > Please note that this group is for discussion between users only. > > To get support from AmiBroker please send an e-mail directly to > SUPPORT {at} amibroker.com > > For other support material please check also: > http://www.amibroker.com/support.html > > > > > > ________________________________ > YAHOO! GROUPS LINKS > > Visit your group "amibroker" on the web. > > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > ________________________________ > > > ________________________________ > Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/