Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RGB option how to choose color

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

    RGB option how to choose color

    Hi, i would like to ask you somethig..

    if i want to have setting for my indicator, i just create new variable:
    private Color var = Color.Lime;

    and then method
    public Color Var
    {
    get { return var; }
    set { var = value; }
    }

    it allows to set the "var" color for this variable in the table when is user adding my indicator to the chart.

    But what if he wants to set value of "var" by RGB??
    How could i allow that he can set the color by RGB numbers and not by choosing the color? Is that even possible?

    Thank you very much

    #2
    Hi, you could work with the Color.FromArgb method - http://msdn.microsoft.com/en-us/libr....fromargb.aspx

    Comment


      #3
      Could you please give me example?
      Somethig like this for classic color choosing:

      private Color var = Color.Lime;
      public Color Var
      {
      get { return var; }
      set { var = value; }
      }

      Thank you very much

      Comment


        #4
        zooinek, you could define a user defined color input with the sample code from this tip - http://www.ninjatrader-support2.com/...ead.php?t=4977

        Then just enter for example 0, 0, 0 in the user color input to choose the color black in your indicator.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        576 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 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
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X