• 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

get seconds print out in Time[0]

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

    get seconds print out in Time[0]

    can we get Time[0] to print out in seconds or even more precise?

    #2
    Hello Boonfly8,

    Yes, when you Print(Time[0]) this should already print the seconds. You will likely see 0 seconds though unless you are using a BarsType that has second granularity.

    For example on any series greater than or equal to a Minute series, you will not see second granularity. On Tick or Second series, you would see second granularity. This also relates to the increment of the series when using the Second series, for example using a 60-second series you wouldn't see any seconds again, but using other increments like 35 seconds you would.

    To print Millisecond granularity for ticks, you would need to format the time before printing it.

    Code:
    Time[0].ToString("hh.mm.ss.ffffff");
    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rouillard, Today, 03:34 PM
    0 responses
    5 views
    0 likes
    Last Post rouillard  
    Started by mquinteroj, Today, 02:41 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by JPPoulin, Today, 01:32 PM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by bltdavid, Today, 01:09 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by pstrusi, Today, 12:50 PM
    2 responses
    8 views
    0 likes
    Last Post pstrusi
    by pstrusi
     
    Working...
    X