Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Date box in Data Series window

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

    Date box in Data Series window

    Hi,

    In my indicator, one of the user parameters is a Date entry. Right now, I'm using NT's ToDay() format ("20121001" for Oct 1, 2012).

    I would like to know if there's a way to code in a proper Date box like the one that exists in the Data Series window for "Start date" and "End date"? (see attachment).

    Would appreciate if anyone could assist, or at the least, point me in the correct direction for more research.

    Thanks!

    -Nick
    Attached Files

    #2
    Hello Nick,

    You may do something like:

    Code:
    #region Variables
                
    	private DateTime myDateTime = new DateTime(2013,2,20); 
          
    #endregion
    
     #region Properties
           	[Description("")]
    	[GridCategory("Parameters")]
    	public DateTime MyDateTime
    	{
    		get { return myDateTime; }
    		set { myDateTime = value; }
    	}
    #endregion
    JCNinjaTrader Customer Service

    Comment


      #3
      Thanks JC!

      Is there any way to make it default to the current day's date?

      I tried

      private DateTime myDateTime = new DateTime(DateTime.Today);

      and that didn't turn out right

      My C# skills are absolutely noobish, unfortunately.

      -Nick

      Comment


        #4
        Hello Nick,

        Code:
        private DateTime myTime = new DateTime(DateTime.Today.Year,DateTime.Today.Month, DateTime.Today.Day );
        JCNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        648 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        369 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X