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 elirion, Today, 09:32 PM
            0 responses
            2 views
            0 likes
            Last Post elirion
            by elirion
             
            Started by cre8able, Today, 09:15 PM
            1 response
            5 views
            0 likes
            Last Post bltdavid  
            Started by cummish, Today, 08:43 PM
            0 responses
            10 views
            0 likes
            Last Post cummish
            by cummish
             
            Started by Option Whisperer, Today, 07:58 PM
            4 responses
            21 views
            0 likes
            Last Post Option Whisperer  
            Started by ETFVoyageur, 05-07-2024, 07:05 PM
            13 responses
            87 views
            0 likes
            Last Post ETFVoyageur  
            Working...
            X