Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    Paul H.NinjaTrader Customer Service

    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.
      Paul H.NinjaTrader Customer Service

      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.
          Paul H.NinjaTrader Customer Service

          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; }
            Paul H.NinjaTrader Customer Service

            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 samish18, 04-17-2024, 08:57 AM
              22 responses
              107 views
              0 likes
              Last Post samish18  
              Started by Ashkam, 04-29-2024, 09:28 AM
              2 responses
              26 views
              0 likes
              Last Post Ashkam
              by Ashkam
               
              Started by Felix Reichert, 04-26-2024, 02:12 PM
              6 responses
              41 views
              0 likes
              Last Post Felix Reichert  
              Started by MrForgetful, Today, 01:28 AM
              3 responses
              21 views
              0 likes
              Last Post NinjaTrader_Zachary  
              Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
              16 responses
              51 views
              0 likes
              Last Post cmtjoancolmenero  
              Working...
              X