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

Color and Time as Variables

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

    Color and Time as Variables

    I have some indicators that change the back color upon certain conditions. I'd like to allow the user to select the color as a variable but can't find a way to provide that as an input (like you can for lines). Can anyone tell me how to do that?

    Also some indicators only are active during certain time windows. Similarly, is there a way to allow the user to input times as variables?

    Thanks.

    #2
    Hello Richard,

    Thank you for your post.

    Please see the article below on creating user definable Color Inputs:


    There isn't an equivalent guide on user definable custom times. Working with DateTime properties is more C# related than NinjaScript. The article below provides advice on working with Date/Time objects in NinjaScript, but you may need to look at some of the C# reference samples to achieve what you want.



    Represents an instant in time, typically expressed as a date and time of day.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the posts. I've downloaded them and am working on it.

      Comment


        #4
        I got the color inputs going fine. Thanks so much.

        I think I am following how to manipulate times from the sample you attached, but not sure how to imput a time from the user. Any help?

        Comment


          #5
          Hi Richard,

          Unfortunately this is outside the scope of support we provide. May be easier to accept an INT representing time and work with that.
          Ryan M.NinjaTrader Customer Service

          Comment


            #6
            Hi Richard,

            you could try to define a property as DateTime or TimeSpan and test how the result would look like.

            Regards
            Ralph

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cmtjoancolmenero, Yesterday, 03:58 PM
            1 response
            17 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by benmarkal, Yesterday, 12:52 PM
            3 responses
            23 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by helpwanted, Today, 03:06 AM
            1 response
            20 views
            0 likes
            Last Post sarafuenonly123  
            Started by Brevo, Today, 01:45 AM
            0 responses
            11 views
            0 likes
            Last Post Brevo
            by Brevo
             
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            244 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Working...
            X