Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to change color of bars?

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

    How to change color of bars?

    Hi:

    I'm trying to change the default green and red color of candlesticks inside my strategy. Is there a way of change the definition of "Up Bar Color" or "Down Bar Color" just once (in initialize or similar)?

    There's an ovbious way in "OnBarUpdate" but seems logical to have a way to declare "I want to use color A and Color B in this strategy", but could not find it.

    Any ideas?

    Thanks,
    pak

    #2
    Hi Pak,

    These properties are not supported but you should should be able to see them through Intellisense. As a hint, type this.ChartControl.D

    The supported technique is assigning BarColor conditionally in OnBarUpdate()
    if(Close[0] > Open[0])
    BarColor = Color.Purple;

    else
    BarColor = Color.Orange;
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by pakricard View Post
      Hi:

      I'm trying to change the default green and red color of candlesticks inside my strategy. Is there a way of change the definition of "Up Bar Color" or "Down Bar Color" just once (in initialize or similar)?

      There's an ovbious way in "OnBarUpdate" but seems logical to have a way to declare "I want to use color A and Color B in this strategy", but could not find it.

      Any ideas?

      Thanks,
      pak
      You may want to look at this: http://www.ninjatrader.com/support/f...28225#poststop

      Comment

      Latest Posts

      Collapse

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