IIF returns an array and you need a specific value which you can get, for example, by IIF(lastvalue(buy) == 1, .... ).
http://www.amibroker.com/guide/afl/iif.html http://www.amibroker.com/guide/afl/afl_view.php?id=81 Bill ----- Original Message ----- From: chomper777 To: [email protected] Sent: Wednesday, September 24, 2008 7:50 AM Subject: [amibroker] Change Chart Background color for Buy and Sell Signal. Hi, I want my chart background to change color depend on buy or sell signal using the setchartbkcolor command, but I'm getting error. Here is the code, can anyone help? thanks ColorBK = IIf( Buy, colorDarkGreen,colorDarkRed); SetChartBkColor(ColorBK); ------------------------------------ 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links ------------------------------------------------------------------------------ No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.169 / Virus Database: 270.7.1/1688 - Release Date: 9/24/2008 6:29 AM
