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

[amibroker] Formating deciman place within Title statement



PureBytes Links

Trading Reference Links

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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/