Don,
You have to format the values:
Title = Writeval(variable,1.2);
The number after the decimal place (2 in this case) specifies the number of
decimal places.
Ara
----- Original Message -----
From: "Don Lindberg" <dlindber@xxxxxxxxxxnet>
To: <amibroker@xxxxxxxxxps.com>
Sent: Friday, July 20, 2007 12:00 AM
Subject: [amibroker] Formating deciman place within Title statement
>I have hunted through the user manual and can't find anything. Here
> is my issue. I have an indicator that is just one big print out of
> information in a Title=
statement. Many of the pieces of information
> I am displaying are either curency amounts or percentages. I would
> like all to display just 2 decimal places, but I get everything from
> 0 to 5 decimal places. I have included part of my code, so you can
> see what I am doing.
>
> PrvC = Ref( Close , -1 );
> Title = Date()+" "+Name()+" " + FullName()+" Open
=
> $"+Open+" High = $"+High+" Low = $"+Low+"
Close = $"+Close
> +EncodeColor( colorBrown )+"\nPrevious Close = $"+PrvC +"
Days
> Change = $ "+(C-PrvC)+" Daily % Change = "+((C-PrvC)/(PrvC)*100)+"
> %";
>
> This is just a small portion of code, but way I display is the same
> throughout. Now I realize that some of these calculations can go to 5
> or more decimal places, but I am only interested in 2. How do I keep
> them within the 2 decimal limits?
>
> Don Lindberg
>
>
>
>
> 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
>
>
>