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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      47 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      23 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X