Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to create a conditionally colored price bar?

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

    How to create a conditionally colored price bar?

    I am trying to figure out how to have a price bar display in red of green if certain conditions are met.
    Specifically, if a bar opens with price in the bottom 1/3 of the bar and closes in the top 1/3 of the bar I want it to be blue. If a bar opens with price in the top 1/3 of the bar and closes in the bottom 1/3 of the bar I want it to be red.
    If anyone knows how to do this I would greatly appreciate instructions.
    Thanks

    #2
    Maestro79, welcome to the NinjaTrader support forums! You can work with BarColor() for this scripting idea - http://www.ninjatrader-support.com/H.../BarColor.html

    Here are some great tutorials to get you started, number 6 is is dealing with coloring the bars and background - http://www.ninjatrader-support.com/H...verview18.html

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Maestro79, welcome to the NinjaTrader support forums! You can work with BarColor() for this scripting idea - http://www.ninjatrader-support.com/H.../BarColor.html

      Here are some great tutorials to get you started, number 6 is is dealing with coloring the bars and background - http://www.ninjatrader-support.com/H...verview18.html
      Thanks. I'll check those out.

      Comment


        #4
        Dead links

        The links in the answer, below, are dead.

        Are there new links explaining the process for Ninjatrader 8?

        Originally posted by NinjaTrader_Bertrand View Post
        Maestro79, welcome to the NinjaTrader support forums! You can work with BarColor() for this scripting idea - http://www.ninjatrader-support.com/H.../BarColor.html

        Here are some great tutorials to get you started, number 6 is is dealing with coloring the bars and background - http://www.ninjatrader-support.com/H...verview18.html

        Comment


          #5
          In NT8

          BarColor is BarBrush
          CandleOutlineColor is CandleOutlineBrush

          J~

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          82 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          43 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          64 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          68 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          56 views
          0 likes
          Last Post CarlTrading  
          Working...
          X