Whats the difference between these iif and if?

BarColor  = IIf(nextBarHigher,colorGreen,IIf(nextBarLower,colorRed,colorBlue));

OR

BarColor  = IIf(nextBarHigher,colorGreen,colorRed)

Need some clarification on the differences.

When would colorBlue appear ?
What difference should I be expecting ?

I was reading and trying to understand this.
http://www.amibroker.com/members/library/detail.php?id=1252&hilite=ROC

Thanks.

5 posts were merged into an existing topic: IIf function versus if statement