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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      239 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      155 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      164 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      247 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      199 views
      0 likes
      Last Post CarlTrading  
      Working...
      X