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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        160 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        308 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        245 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        349 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X