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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        161 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        309 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        245 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        349 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X