NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 05-15-2007, 12:05 AM   #1
funk101
Senior Member
 
Join Date: Jan 2006
Location: Margate, Florida, USA
Posts: 426
Thanks: 0
Thanked 2 times in 2 posts
Send a message via AIM to funk101
Default Decimal format -> stumped...

I know this is a LAMO question but, I can't seem to get a huge double like:
77.272789487 to display as just 77.27. I'm looking for printf(), you know, adding a %.2f kind of thing, but it aint' happenin'! What is the call? I've tried decimal/float, and am getting a type conversion error.
funk101 is offline  
Reply With Quote
Old 05-15-2007, 12:55 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Check out the double.ToString("0.00") method
NinjaTrader_Dierk is offline  
Reply With Quote
Old 05-15-2007, 01:05 AM   #3
funk101
Senior Member
 
Join Date: Jan 2006
Location: Margate, Florida, USA
Posts: 426
Thanks: 0
Thanked 2 times in 2 posts
Send a message via AIM to funk101
Default Oh yeah!

I've been looking for a long time for that one
funk101 is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stumped! pivot44 ATM Strategies (Discretionary Trading) 3 03-23-2007 02:39 AM
Indicator convert from decimal to 32nds Json Indicator Development 5 03-08-2007 01:45 AM
Format for NTOrderStatus hmmerritt Automated Trading 1 08-08-2006 06:53 AM
Need Timestamp Format aspTrader Automated Trading 1 12-11-2005 08:46 PM
ZN format boblin Suggestions And Feedback 1 04-26-2005 10:50 AM


All times are GMT -6. The time now is 06:40 PM.