• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NinjaScript Debug Methods: Print command

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

    NinjaScript Debug Methods: Print command

    Print(Close[0].ToString() + " " + High[0].ToString()) will print the close and high of a set of bars to the output window. Unfortunately, if some prices are even whole numbers and some have a decimal value the columns in the output window will not line up vertically. This is because the low-order zero and decimal point are dropped. Is there a way to format all the pricesso that the columns are correctly aligned? Thanks

    #2
    imported post

    Try Print(Close[0].ToString("0.00") + " " + High[0].ToString("0.00").

    Also: Check the Microsoft .NET help docs for the various options to custom format strings.
    DierkNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by trader14, Today, 08:12 PM
    0 responses
    5 views
    0 likes
    Last Post trader14  
    Started by ypbtrainer, Today, 05:38 PM
    0 responses
    2 views
    0 likes
    Last Post ypbtrainer  
    Started by GARZONJ, Yesterday, 11:22 PM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by mike09, Yesterday, 07:37 PM
    1 response
    24 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by jilokasin31417, Today, 08:27 AM
    5 responses
    18 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Working...
    X