[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [AmiBroker] Formatting decimal place within Title statement



PureBytes Links

Trading Reference Links

Thanks,

That did it. I must have been asleep last night, and missed it entirely.

 

Don

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of ChrisB
Sent: Friday, July 20, 2007 12:25 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Formating deciman place within Title statement

 

Don,

What I tend to do is to use the writeval() in my titles.

So:

Writeval(Close, 3.2)

controls the number of decimals to 2 places...

Writeval( PrvC, 3.3)

controls the number of decimals to 3 places etc.

Thusly I can control the decimal places for each output, perhaps four
for xxxJPY currency pairs, perhaps two decimals for ROC() etc.

Regards

Chris B

Don Lindberg wrote:
>
>
> 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?

__._,_.___

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___