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 quicksandatl, 05-09-2024, 11:11 AM
              3 responses
              18 views
              0 likes
              Last Post quicksandatl  
              Started by morrnel, 05-12-2024, 06:07 PM
              6 responses
              65 views
              1 like
              Last Post NinjaTrader_Manfred  
              Started by algospoke, 05-13-2024, 06:53 PM
              2 responses
              21 views
              0 likes
              Last Post algospoke  
              Started by janio973, Yesterday, 07:24 PM
              6 responses
              29 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by AlphaOptions, 06-18-2013, 08:24 AM
              5 responses
              2,169 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Working...
              X