Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

User input variables for paint bar colors

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

    User input variables for paint bar colors

    I'm new to NinjaScript, and I have the following basic question:


    I want to add input variables to the "Visual" group under indicator settings to paint my price bars in the chart according to a specified formula (and user's preference). I also want these settings to be separate from other user input settings, and therefore, that's why I want them under Visual.
    I'm trying to create the following group of user input variables (when expanding Visual):

    +Visual
    Color bars? (True or False)
    Up color
    Down color
    Neutral color
    Outline color

    Can someone tell me the steps to do that, since it seems that I can't do that using the wizard? I searched in this forum, but could not find any example.

    Thanks,
    Dori

    #2
    Go into the forum and look up ColorZones..

    WAIT - I just did. I could NOT find it.

    I downloaded this indicator/strategy and modified it.. but I can't find it now?!

    Was it in the 6.5 area?

    Was it deleted?

    Are you kidding me?

    It works in NT7!!

    I just used some of what you ask about input for something I just made.



    Originally posted by ds1111 View Post
    I'm new to NinjaScript, and I have the following basic question:


    I want to add input variables to the "Visual" group under indicator settings to paint my price bars in the chart according to a specified formula (and user's preference). I also want these settings to be separate from other user input settings, and therefore, that's why I want them under Visual.
    I'm trying to create the following group of user input variables (when expanding Visual):

    +Visual
    Color bars? (True or False)
    Up color
    Down color
    Neutral color
    Outline color

    Can someone tell me the steps to do that, since it seems that I can't do that using the wizard? I searched in this forum, but could not find any example.

    Thanks,
    Dori

    Comment


      #3
      Sledge,

      Thanks for the reply and the email with the code.

      I'm very familiar with C# but not as much with NinjaScript program structure to make that happen and therefore my question.

      I didn't feel comfortable pasting snippets of your code here, but could you guide me through the steps necessary? (e.g. how do I create a subgroup of user input variables under a category, what is the template to define them under properties, etc.).
      I could not find such 'program structure' related info for Ninjascript as I navigated through this forum.

      Anybody else that also has this information, please chime in.

      Thanks a lot!

      Comment


        #4
        Dori, we could unfortunately not support adding to the default Visual category, but you can change the category name under which your user inputs are listed in the Properties area of the code.

        To setup color inputs, serialization is needed, a 'how to' was posted here on this topic -

        Comment


          #5
          There is a properties section you can expand and do up some XML that will be parsed by the NT at the indicator display level. It's located near the bottom of the code NT setups, but before the "NinjaScript generated code. Neither change nor remove."

          The other helper post pretty much covers it too.

          I just cut and paste some of the code I sent you (for example, Zone 4 with the color parameters) and figured out what I needed from there for my code, and hacked it all together.

          Only other thing to note - is within the category, things are in alphabetical order.

          p.s. That's not my code, it was an indicator that was posted here in the scripts forum, but has some how managed to disappear?! Else I would have linked it.



          Originally posted by ds1111 View Post
          Sledge,

          Thanks for the reply and the email with the code.

          I'm very familiar with C# but not as much with NinjaScript program structure to make that happen and therefore my question.

          I didn't feel comfortable pasting snippets of your code here, but could you guide me through the steps necessary? (e.g. how do I create a subgroup of user input variables under a category, what is the template to define them under properties, etc.).
          I could not find such 'program structure' related info for Ninjascript as I navigated through this forum.

          Anybody else that also has this information, please chime in.

          Thanks a lot!

          Comment


            #6
            Thanks Sledge and Bertrand... that's exactly what I needed.

            Very powerful...

            Is there any documentation on the Properties section of the code and what can and can not be done there? Again, I"m coming from a strong C# and OOP programming background and want to understand the why's, not only the how's...

            Comment


              #7
              ds1111, the only supported / documented changes to the Propeties area would be shown in this tip - http://www.ninjatrader.com/support/f...ead.php?t=5782
              Last edited by NinjaTrader_Bertrand; 02-14-2012, 02:55 AM.

              Comment


                #8
                Thanks Bertrand.

                I think you meant this tip: http://www.ninjatrader.com/support/f...ead.php?t=4977

                your link points to this thread itself.

                Comment


                  #9
                  Originally posted by ds1111 View Post
                  Thanks Bertrand.

                  I think you meant this tip: http://www.ninjatrader.com/support/f...ead.php?t=4977

                  your link points to this thread itself.
                  Sorry about that, yes I meant this tip.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  558 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  324 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  545 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  547 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X