Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Decimal format -> stumped...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    Check out the double.ToString("0.00") method

    Comment


      #3
      Oh yeah!

      I've been looking for a long time for that one

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by llanqui, Yesterday, 03:51 PM
      1 response
      18 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by kujista, Yesterday, 12:39 AM
      5 responses
      18 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by nleitman, Yesterday, 11:46 AM
      9 responses
      27 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by cmtjoancolmenero, 04-25-2024, 03:58 PM
      18 responses
      105 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by Mindset, Yesterday, 06:19 AM
      2 responses
      15 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X