Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can I use datetime datatype as input parameter?

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

    Can I use datetime datatype as input parameter?

    Hi;
    I am just wondering if I can use a datetime parameter as input parameter for an indicator? The dropbox in the wizard does not list it as being available.

    Also can I define a dropbox with predefined values?

    Thanks
    Thomas

    #2
    Originally posted by hometradingblog View Post
    Hi;
    I am just wondering if I can use a datetime parameter as input parameter for an indicator? The dropbox in the wizard does not list it as being available.
    You would have to manually code it; the wizard does not provide an interface for it.

    Also can I define a dropbox with predefined values?

    Thanks
    Thomas
    You would need an enum variable for that.

    Comment


      #3
      For a sample into enums, please see this one here - http://www.ninjatrader.com/support/f...ead.php?t=3420

      Comment


        #4
        Will test the enum soon, implemented the datetime and works like a treat.
        Thanks

        Comment


          #5
          Can you elaborate on the DateTime parameter? If I define a DateTime property how is it rendered in the UI? It is just a string? Do I have to parse the string to construct a DateTime object when setting the value?

          Edit:
          Ok just tried it. It displays a calendar picker, but no time component.
          I see using a TimeSpan renders as a time in format hh:mm:ss
          Last edited by overflowing; 07-26-2012, 05:58 PM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          581 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          337 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X