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

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 Perr0Grande, Yesterday, 08:16 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by f.saeidi, Yesterday, 08:12 AM
          3 responses
          24 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by algospoke, Yesterday, 06:40 PM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by quantismo, Yesterday, 05:13 PM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by The_Sec, 04-16-2024, 02:29 PM
          3 responses
          16 views
          0 likes
          Last Post NinjaTrader_ChristopherS  
          Working...
          X