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

Changing color of a "line on close" chart

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

    Changing color of a "line on close" chart

    Hello,
    When I display the price with a line, I am looking for a way to change automatically the color without opening the properties of data series. I am trying to change the color of the price from an indicator but I have not found the way to access the object for the price. The problem is that PlotColors[0][x] does not reference the price but the 1st plot of the indicator... I have tried to find an object similar to BarPeriods, as BarPeriods[0][x] reference the main data series. Have you any idea to do that ?
    Thank you,
    F.

    #2
    Hello F,

    Thanks for the post and welcome to the NinjaTrader forums.

    Normally you would use BarColor for this, but I see it does not change color for LineOnClose style charts. There is unfortunately not a supported property available that affects color for line on close charts. One work around available for this is to set a plot based on close value, and then change colors using PlotColors. You can hide the main price bars (will have to be OHLC or CandleStick style) by setting as color transparent.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Yes, I have been surprised that color can be programmed only for bar charts (candlesticks, OHLC, HL) with BarColor, and not for "line on close" charts.

      The reason why I try to do that is because I work with black backgrounds, for taking care of my eyes. The defaults color for "line on close" is black. The default colors for candlesticks charts are black for the outline and the wick, which is problematic.
      More surprising, the possibility to right click in the configuration of data series to save the colors setup ("Set default for xxx period type") does not help. For example, if we set the line to be "Silver", save the default for the "line on close" with "Set default for day period type", then change to a candlestick chart, stop and restart NT, then switch to the line on close display, the color is black. The color comes back to the default (i.e. black).

      It seems there is no way to save the setup for each display type. Only the last used is saved. If we could save a setup for each display type, I would no longer need to try changing the color with an indicator.

      F.

      Comment


        #4
        You can save settings per interval type by from the chart's data series window. After setting up, you can Right Click > Save As for (minute, daily, tick, range, etc).

        You can also save specific layouts using the Workspace feature:
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          All I have tried show that neither setting default from data series nor saving workspace keep the settings of colors after a restart of NT. I can details the steps if necessary.

          I use the free version of NT 7.1000.7 on Win XP SP3.

          Comment


            #6
            It's working OK here, for workspaces, interval type, and chart templates can preserve colors and chart style.

            Commonly overlooked when creating a new chart is selecting template "default" which has its own settings. If you want the chart to use the settings saved as part of an interval type, make sure to select template "none".

            If you are still having difficulty preserving these settings, please email support 'at' ninjatrader 'dot' com so we can arrange remote support
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              Thanks for allowing me access to your computer to show how preferences can be saved using workspaces, chart templates, and interval types. Everything was working as expected, so you may want to review documentation below for help with workspaces and templates.



              We also discuss these topics in our live webinars. Charting has two dedicated webinars that can help with preserving layouts and settings.
              Ryan M.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by aa731, Today, 02:54 AM
              0 responses
              4 views
              0 likes
              Last Post aa731
              by aa731
               
              Started by thanajo, 05-04-2021, 02:11 AM
              3 responses
              469 views
              0 likes
              Last Post tradingnasdaqprueba  
              Started by Christopher_R, Today, 12:29 AM
              0 responses
              10 views
              0 likes
              Last Post Christopher_R  
              Started by sidlercom80, 10-28-2023, 08:49 AM
              166 responses
              2,237 views
              0 likes
              Last Post sidlercom80  
              Started by thread, Yesterday, 11:58 PM
              0 responses
              4 views
              0 likes
              Last Post thread
              by thread
               
              Working...
              X