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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      221 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      136 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      150 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      236 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      193 views
      0 likes
      Last Post CarlTrading  
      Working...
      X