• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart Background Color

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

    Chart Background Color

    Is there a variable I can use to pickup the color that is being used as the background for the chart? I am trying to draw a box with the same color as the background of the chart, but don't want to statically set the color of the box because if the background color changes the box won't blend in.
    Josh P.NinjaTrader Customer Service

    #2
    Not supported at this time.
    RayNinjaTrader Customer Service

    Comment


      #3
      I would like to ask if there are some changes since 2007 and if it is possible to set color of background as variable?

      Comment


        #4
        Thanks for the post emuns, while the ChartControls would not be supported territory you could for example look into adding this snippet in OnStart() to change the color to your liking from the code -

        protected override void OnStartUp()
        {

        ChartControl.BackColor = Color.AliceBlue; // your color here.

        }

        The color could be also made a public user input for the script for sure.

        You probably also want to add some logic to first store the current BackColor in a custom variable so you could restore to the chart default once the study is removed in OnTermination().
        Last edited by NinjaTrader_Bertrand; 11-11-2013, 04:36 AM.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hello Bertrand,
          Iˇm not sure if I understand what you mean or maybe you don´t understand what I mean... I use my own indicator (see attachment) which displays different color of a background of a chart depending on ETH/RTH. If I would like to change the color I wouln´t like to do it by going to the script but rather just changing it in Parameters. Is this possible?

          Thank you.
          Attached Files

          Comment


            #6
            Thanks for the clarification - that was indeed a misunderstanding on my part here.

            You can make a user input of type color to make this choice for your indicator script available from the UI directly, we also have a tip that would go into the steps needed to achieve that - http://www.ninjatrader.com/support/f...ead.php?t=4977
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by tjendra, Today, 09:58 AM
            0 responses
            1 view
            0 likes
            Last Post tjendra
            by tjendra
             
            Started by juanram, Today, 03:50 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by emuns, Today, 08:28 AM
            0 responses
            4 views
            0 likes
            Last Post emuns
            by emuns
             
            Started by backtester831, Today, 08:14 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_RyanS  
            Started by HiddenPhilosopher, Today, 03:53 AM
            6 responses
            15 views
            0 likes
            Last Post HiddenPhilosopher  
            Working...
            X