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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    478 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    321 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    258 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    342 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    310 views
    0 likes
    Last Post CarlTrading  
    Working...
    X