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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      63 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      87 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      47 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      105 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      63 views
      0 likes
      Last Post PaulMohn  
      Working...
      X