Hi - you can use NumToStr() function for title formatting...

Title=  " Pctval = " + EncodeColor(SelectedValue(dyn_col)) + NumToStr( 
pctval, 1.2 ) + "%";

Steve

----- Original Message ----- 
From: "doedau" <[email protected]>
To: <[email protected]>
Sent: Wednesday, August 05, 2009 2:38 AM
Subject: [amibroker] dynamic color and decimal places in chart title


> Hi all,
> I am trying to modify color and decimal places in a chart title.
> I found some clever person had already solved the color problem as below, 
> but I cant find a way to set the nummber of decimal places.
>
> I have tried functions prec and strtonum but didnt work.
>
> Can anyone help please?
>
> Code snippet:
>
> "pctval" is my calculated percentage for which I want to change color and 
> decimal places.
>
> dyn_col = IIf(pctval>0,colorGreen,colorRed);
>
> Title=  " Pctval = " + EncodeColor(SelectedValue(dyn_col)) + pctval + "%";
>
> Regards, Don from Perth Australia.
>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>
> 


Reply via email to