Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Set plot color equal to other plot color

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

    Set plot color equal to other plot color

    Scenario:

    I want to set a plot color equal to another plots color. I tried "PlotBrushes[LineNumber + PlotOffset][0] = PlotBrushes[0][0] ;//Use override color" but doesn't do anything.
    I used to do this in Ninja 7 all the time but seem to have an issue on Nina 8.

    Question:

    I am thinking it is a syntax issue on Ninja 8. What is the correct syntax to set one plots color equal to another plot?

    Cheers

    #2
    Are you trying to set the plot's overall color e.g. permanently for all bars to another plot's overall color? Or, are you trying to copy the overridden color of an individual bar from one plot to another? If you mean for that individual bar, you can do something like PlotBrushes[2][0] = PlotBrushes[0][0]; which would copy plot index #0's color to plot index Forum for the current bar. If you mean in general, those are properties of the Plots[] object e.g. Plots[2].Brush; but those are set up "once and for all" when the plot is configured.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hello ct,

      Thanks for your post.

      QuantKey_Bruce is correct. To change the color of an individual bar you may use PlotBrushes[int PlotIndex][int barsAgo] as QuantKey_Bruce explained.

      The code might look something like PlotBrushes[1][0] = PlotBrushes[0][0];.

      Plots[int index].Brush would be used to change the color of the entire plot series.

      An example of this would be Plots[0].Brush = Brushes.Green;

      See the help guide pages below for more information and sample code.

      PlotBrushes: https://ninjatrader.com/support/help...lotbrushes.htm
      Plots: https://ninjatrader.com/support/help.../nt8/plots.htm

      Please let me know if I may assist further.

      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment

      Latest Posts

      Collapse

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