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 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
          311 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
          350 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