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

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
    BertrandNinjaTrader Customer Service

    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.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by algospoke, 04-17-2024, 06:40 PM
        6 responses
        48 views
        0 likes
        Last Post algospoke  
        Started by arvidvanstaey, Today, 02:19 PM
        4 responses
        11 views
        0 likes
        Last Post arvidvanstaey  
        Started by samish18, 04-17-2024, 08:57 AM
        16 responses
        61 views
        0 likes
        Last Post samish18  
        Started by jordanq2, Today, 03:10 PM
        2 responses
        9 views
        0 likes
        Last Post jordanq2  
        Started by traderqz, Today, 12:06 AM
        10 responses
        21 views
        0 likes
        Last Post traderqz  
        Working...
        X