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 Dictionary?

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

    Color Dictionary?

    Where can I find a listing of the avaiable colors for the color[] array? I searched help but didn't get the listing of all the colors such as

    color.darkgrey
    color.controlwhite

    i need a particular color

    etc.

    thanks,

    Mike

    #2
    Hello Mike,
    This is more of a C# query however ou can find the names of the all supported color from here


    And to clarify are you trying to create an array of the colors?

    I look forward to assisting you further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      thanks! exactly what I needed. i'm just using these colors in the ninja script color array.

      Comment


        #4
        Hello Mike,
        Thanks for your note.

        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          I have a similar question. Is it possible to determine the default color of the "line" object, for example? I don't want to change the default, but merely know what color it is (from NinjaScript).

          In a related example, if I wanted to determine the color of the "axis", I would do something like: ChartControl.AxisColor. Is there one for a Line?

          Thanks!
          Daniel

          Comment


            #6
            Originally posted by neoikon View Post
            I have a similar question. Is it possible to determine the default color of the "line" object, for example? I don't want to change the default, but merely know what color it is (from NinjaScript).

            In a related example, if I wanted to determine the color of the "axis", I would do something like: ChartControl.AxisColor. Is there one for a Line?

            Thanks!
            Daniel
            I don't think this is exactly what you're looking for, but you could just create a Line object, then use Line.Pen.Color to get the color.

            Comment


              #7
              Originally posted by Radical View Post
              I don't think this is exactly what you're looking for, but you could just create a Line object, then use Line.Pen.Color to get the color.
              I thought of that. However, I can't DRAW a line without specifying the color. But, if I merely create an object like this...

              PHP Code:
              NinjaTrader.Gui.Chart.Line tempLine = new NinjaTrader.Gui.Chart.Line();
              Print (
              tempLine.Pen.Color.ToString()); 
              ... then it's not the correct value. (It says "DarkGray", when my actual default is "Firebrick")

              Also, Ninja won't let me create the abstract class "ILine".

              Is there another way of creating the line object that you meant?

              Thanks!
              Daniel

              Comment


                #8
                Originally posted by neoikon View Post
                Is there another way of creating the line object that you meant?
                Nope, you've covered everything I would've thought of. Too bad it didn't work.

                Comment


                  #9
                  Originally posted by Radical View Post
                  Nope, you've covered everything I would've thought of. Too bad it didn't work.
                  Boo! ;]

                  Thanks for the ideas, though. I'll keep brainstorming.

                  Daniel

                  Comment


                    #10
                    Try Line[0].Pen.Color for your first line (Line[1] for second), going from memory here so it might not be 100%.

                    Dan
                    eDanny
                    NinjaTrader Ecosystem Vendor - Integrity Traders

                    Comment


                      #11
                      Originally posted by eDanny View Post
                      Try Line[0].Pen.Color for your first line (Line[1] for second), going from memory here so it might not be 100%.

                      Dan
                      But if there are currently no lines on the chart, how will that give me the default line color?

                      Daniel

                      Comment


                        #12
                        I see what you are asking. There would be no default line color, I think, because there is no line without creating one and to create one you need to specify a color. Using axis color as an example is misleading because there is always a color assigned to the axis while a chart is in existence and a color does not need to be specified by the user when a chart is opened because there is a default.
                        eDanny
                        NinjaTrader Ecosystem Vendor - Integrity Traders

                        Comment


                          #13
                          Thanks for the reply. I see what you are saying, but there is still a default color for the user drawn Line objects. Even on a clean install of NT, if you open a chart and draw a line, the line will be a particular color. This color can be changed, obviously, but there will always be a "default" color for the user drawn line objects.

                          That's the color I'm looking to determine. :] I don't want my indicator to conflict with that particular color, which is why I am looking to find it. I think I found a work around for my particular situation that should work in 99% of the cases, but it's not perfect. Being able to explicitly find out, would be ideal.

                          Daniel

                          Comment


                            #14
                            Alright, I was referring to programmatically drawn lines, not draw object tools. Can't help there.

                            Dan
                            eDanny
                            NinjaTrader Ecosystem Vendor - Integrity Traders

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Waxavi, Today, 02:10 AM
                            0 responses
                            6 views
                            0 likes
                            Last Post Waxavi
                            by Waxavi
                             
                            Started by TradeForge, Today, 02:09 AM
                            0 responses
                            11 views
                            0 likes
                            Last Post TradeForge  
                            Started by Waxavi, Today, 02:00 AM
                            0 responses
                            2 views
                            0 likes
                            Last Post Waxavi
                            by Waxavi
                             
                            Started by elirion, Today, 01:36 AM
                            0 responses
                            4 views
                            0 likes
                            Last Post elirion
                            by elirion
                             
                            Started by gentlebenthebear, Today, 01:30 AM
                            0 responses
                            5 views
                            0 likes
                            Last Post gentlebenthebear  
                            Working...
                            X