Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
      BertrandNinjaTrader Customer Service

      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 LawrenHom, Today, 10:45 PM
          0 responses
          3 views
          0 likes
          Last Post LawrenHom  
          Started by love2code2trade, Yesterday, 01:45 PM
          4 responses
          28 views
          0 likes
          Last Post love2code2trade  
          Started by funk10101, Today, 09:43 PM
          0 responses
          7 views
          0 likes
          Last Post funk10101  
          Started by pkefal, 04-11-2024, 07:39 AM
          11 responses
          37 views
          0 likes
          Last Post jeronymite  
          Started by bill2023, Yesterday, 08:51 AM
          8 responses
          44 views
          0 likes
          Last Post bill2023  
          Working...
          X