Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Print Statement that allows for seconds

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

    Print Statement that allows for seconds

    Hi,

    I would like some assistance with using the Print() method. I am able to print the date and time but would like to include seconds also, how can this be done?

    Regards,
    suprsnipes

    #2
    String.Format

    Code:
     + String.Format( "{0:MM/dd HH:mm:ss}",Times[0][0]) +
    Originally posted by suprsnipes View Post
    Hi,

    I would like some assistance with using the Print() method. I am able to print the date and time but would like to include seconds also, how can this be done?

    Regards,
    suprsnipes

    Comment


      #3
      Can I please ask an additional question?

      If a multi instrument indicator condition is true and the series loaded on the main and secondary instrument is 1 minute will the timestamps print second data?

      As I have seen that even using the code suggested in the previous post;

      Code:
        + String.Format( "{0:MM/dd HH:mm:ss}",Times[0][0]) +
      However when I change the input series on both of the instruments to 1 second the timestamps are now showing seconds data? Is this correct?

      Thanks in advance,
      suprsnipes

      Comment


        #4
        I think what you are asking would be true, but without performing a test, I can not be certain.

        But in general, if there are seconds available, they will print with the format command. Else 00 would imply you are looking at xx minute bar.. ?









        Originally posted by suprsnipes View Post
        Can I please ask an additional question?

        If a multi instrument indicator condition is true and the series loaded on the main and secondary instrument is 1 minute will the timestamps print second data?

        As I have seen that even using the code suggested in the previous post;

        Code:
          + String.Format( "{0:MM/dd HH:mm:ss}",Times[0][0]) +
        However when I change the input series on both of the instruments to 1 second the timestamps are now showing seconds data? Is this correct?

        Thanks in advance,
        suprsnipes

        Comment


          #5
          Ok, thanks. I will test it out.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          82 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          43 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          64 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          68 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          56 views
          0 likes
          Last Post CarlTrading  
          Working...
          X