@sandeep Is it really that difficult to enter the AFL code properly? Improperly formatted code might result in syntax errors. Your short code is a good example. This is what you get if you copy paste your above code to AmiBroker:
... and that is how your code should look like:
tmp1=abs((High-Low))/2;
tmp2=abs((Open-Close));
BaseCandleColor=ParamColor("BaseCandleColor",colorWhite);
setbarFillColor(IIf(tmp2<=tmp1 ,BaseCandleColor,IIf(C<=O,colorRed,colorBlue)));
Plot(C,"Price",IIf(C>O,ColorRGB(0,0,255),IIf(C<=O,ColorRGB(240,0,0),colorDefault)),64,0,0,0,0,1);
Read here: