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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          81 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          42 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          64 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          66 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          54 views
          0 likes
          Last Post CarlTrading  
          Working...
          X