Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Belfortbucks, Today, 09:29 PM
          0 responses
          6 views
          0 likes
          Last Post Belfortbucks  
          Started by zstheorist, Today, 07:52 PM
          0 responses
          7 views
          0 likes
          Last Post zstheorist  
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          151 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Started by mattbsea, Today, 05:44 PM
          0 responses
          6 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          33 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Working...
          X