Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DateTime UI input box

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

    DateTime UI input box

    Using NT 8.0.4.0
    Is there a way to input a full DateTime into an indicator?
    I want the UI input box to display "mm/dd/yyyy hh mm ss AM/PM" and be editable for user input.


    I see that the following code produces an input box that displays "12/30/2016" but no time parameters.
    Code:
    		protected override void OnStateChange()
    		{
    			if (State == State.SetDefaults)
    			{
    			MyTime = DateTime.Parse("12/30/2016 3:10:00 PM");
    			}
                    }
    
    		#region Properties
    		[NinjaScriptProperty]
    		[Display(Name="MyTime", Order=1, GroupName="Parameters")]
    		public DateTime MyTime
    		{ get; set; }
    		#endregion
    How can the full DateTime be input within 1 parameter input box?

    Any help would be much appreciated.
    Last edited by Camdo; 03-07-2017, 06:20 PM.

    #2
    Hello Camdo,

    Thanks for your post.

    I am currently researching this and will update when I have further information.

    Comment


      #3
      Hello Camdo,

      I have not been able to find a way to combine the calendar and time tool into one. I will create a feature request for this and will update this thread when I have the feature request tracking number.

      Comment


        #4
        I second that.

        Comment


          #5
          Hello,

          Thanks for your posts.

          The feature request tracking ID is SFT-2013, "Support for a single date/time NS property".

          JerryWars vote has been added.

          Comment


            #6
            Hello Camdo, JerryWar,

            With thanks to NinjaTrader_Michael:

            [NinjaScriptProperty]
            [PropertyEditor("NinjaTrader.Gui.Tools.ChartAnchorT imeEditor")]
            [Display(Name="MyDateTime")]
            public DateTime MyDateTime { get; set; }

            Comment


              #7
              Originally posted by NinjaTrader_Paul View Post
              Hello Camdo, JerryWar,

              With thanks to NinjaTrader_Michael:

              [NinjaScriptProperty]
              [PropertyEditor("NinjaTrader.Gui.Tools.ChartAnchorT imeEditor")]
              [Display(Name="MyDateTime")]
              public DateTime MyDateTime { get; set; }
              Thank you Paul.
              Works perfectly. Problem solved.

              Comment

              Latest Posts

              Collapse

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