Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Anyone to get NinjaTrader.Gui.Tools.TimeEditorKey to work with TimeSpan?

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

    Anyone to get NinjaTrader.Gui.Tools.TimeEditorKey to work with TimeSpan?

    The picking won't work with:

    [PropertyEditor("NinjaTrader.Gui.Tools.TimeEditorKe y")]
    [Display(ResourceType = typeof(Custom.Resource), Name = "My Time", GroupName = "Times Group", Order = 1)]
    public TimeSpan tsMyTime { get; set; }

    but it would if it was a DateTime. Is this just how Ninja is at the moment?
    I.e. that if you want a TimeSpan, you have to use a DateTime and then feed that into a TimeSpan else where in the code?

    Thank you.

    #2
    Hello davydhnz,

    That property editor is specifically for DateTimes. If you need to get a timespan you would need to use the DateTimes TimeOfDay​ property.

    tsMyTime.TimeOfDay​

    Comment


      #3
      It means making a lot of TimeSpans, but at least I know what to focus on now. Thank you.

      Comment

      Latest Posts

      Collapse

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