Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Volume Indicator

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

    Volume Indicator

    Is there a volume indicator that does the opposite of what is on the list. When volume is higher than the previous volume bar it's green but if volume is lower than the previous volume it's red. It's not going by the price.

    Thanks
    8

    #2
    bdelorm,

    Could you clarify please? The VolumeUpDown indicator has color based on price.

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by bdelorm View Post
      Is there a volume indicator that does the opposite of what is on the list. When volume is higher than the previous volume bar it's green but if volume is lower than the previous volume it's red. It's not going by the price.

      Thanks
      8
      What existing indicator are you talking about? What you describe should be easy enough to code, even as an addition. In fact, it could probably be done in one line.

      Comment


        #4
        Hi, I just started using NJ today. I downloaded some charts off google and added some indicators.

        There is a built in indicator called VolumeUpDown which colours the volume bars according to whether the price bar closes higher or lower than the open.

        I saved the indicator as a new indicator (VolumeUpDown2) and tried changing the following line in the code:

        if (Close[0] >= Open[0])

        to:

        if (Volume[0] >= Volume[1])

        After compiling and adding to the chart, the volume bars disappear.
        I also tried: if (Close[0] >= Close[1]) but it didn't work.

        Can anyone help?

        Comment


          #5
          Hello,

          Thanks for the forum post and welcome to the forums.

          The reason why this occurs is due to the following. Please add this at the top of OnBarUpdate() and you will be good to go.



          Let me know if I can be of further assistance.
          BrettNinjaTrader Product Management

          Comment

          Latest Posts

          Collapse

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