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 CaptainJack, 05-29-2026, 05:09 AM
              0 responses
              165 views
              0 likes
              Last Post CaptainJack  
              Started by CaptainJack, 05-29-2026, 12:02 AM
              0 responses
              88 views
              0 likes
              Last Post CaptainJack  
              Started by charlesugo_1, 05-26-2026, 05:03 PM
              0 responses
              128 views
              0 likes
              Last Post charlesugo_1  
              Started by DannyP96, 05-18-2026, 02:38 PM
              1 response
              208 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 05-11-2026, 05:56 AM
              0 responses
              185 views
              0 likes
              Last Post CarlTrading  
              Working...
              X