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 haas88, 03-21-2024, 02:22 AM
              19 responses
              220 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by ZeroKuhl, Yesterday, 04:31 PM
              4 responses
              31 views
              0 likes
              Last Post ZeroKuhl  
              Started by cupir2, Yesterday, 07:44 PM
              3 responses
              22 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by reynoldsn, Yesterday, 07:26 PM
              2 responses
              16 views
              0 likes
              Last Post reynoldsn  
              Started by MartinT, 05-17-2023, 06:00 AM
              18 responses
              175 views
              0 likes
              Last Post flybuzz
              by flybuzz
               
              Working...
              X