Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug with TimeSpan datatype indicator properties

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

    Bug with TimeSpan datatype indicator properties

    Hi guys,

    I've found a bug relating to custom indicators with TimeSpan datatypes in NT v7.0.1.

    Please follow the steps below to reproduce:

    1. Download the attached indicator and add to a new chart.

    The indicator will be loaded with the TimeSpan variable set to the default value of 10:10:10.

    2. Shutdown NT and when prompted, save the chart.
    3. Restart NT

    The indicator will be loaded with the timespan variable set to 00:00:00 instead of the default value.

    It looks like the mechanism NT7 uses to persist indicator property values between sessions isn't correctly saving and then restoring TimeSpan datatypes.

    Give me a shout if you have any questions.

    Thanks

    Stu
    Attached Files

    #2
    timespan cannot be serialized. this is by default in .Net

    search the forum on how to serialize timespan, and you will find workarounds.

    Comment


      #3
      Originally posted by bukkan View Post
      timespan cannot be serialized. this is by default in .Net

      search the forum on how to serialize timespan, and you will find workarounds.
      Oh yes, I'd forgotten that the XmlSerializer doesn't handle TimeSpans. My bad.

      Comment


        #4
        Thanks bukkan, the attached works for me.
        Attached Files

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          Thanks bukkan, the attached works for me.
          Thanks guys.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          571 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          330 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          548 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          548 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X