Use of IIF in combination with GFXTXTOUT

I need help in solving my problem .. I have defined RSI 6 . I want to get displayed RSI6 value on screen in YELLOW if value is above 50.999 and in WHITE if value is below 45.000 . How to do this . Following is not working
SetChartOptions(0,0,chartGrid30|chartGrid70);
periods5 = Param( "Periods5", 6, 1, 200, 1 );
//Plot( RSI( periods5), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
Cond21= RSI(periods5) >50.999;
Cond22= RSI(periods5) <45.000;

GfxSetTextColor( ParamColor("Color",colorYellow ));
IIf(Cond21, GfxTextOut(" RSI[06]: " +RSI(periods5),Hor+880, Ver+180),0);
GfxSetTextColor( ParamColor("Color",colorWhite));
IIf(Cond22, GfxTextOut(" RSI[06]: " +RSI(periods5),Hor+880, Ver+180),0);

You do not need GfxSetTextColor for that.
Read carefully https://www.amibroker.com/guide/h_indbuilder2.html

@milind,

Only users with License Verified Badge are allowed to post on this forum.