Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Volume up and down

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

    Volume up and down

    I understand I can access the value of volume for the current bar by assigning VolumeUpDown()[0] to a variable, but it's not specific to up or down, how do I identify if the number returned refers to up or down in the code?

    #2
    Hello, thanks for writing in.

    You would need to check the price of the bar to know if the bar is up or down e.g.

    if(Close[0] > Open[0])
    {
    //green bar
    }
    else if(Close[0] < Open[0])
    {
    //red bar
    }

    Comment


      #3
      Oh, I see... so it does not identify whether it's a sell or a buy, it only shows if it's really up or down from previous...
      Is there a way to identify if the volume is long or short?

      Comment


        #4
        Hi, thanks for your reply

        You would need to use the BuySellVolume indicator to separate the buys and sells. VolumeUpDown is just a regular total volume indicator that colors the plot based on the direction of the bar.

        Best regards.

        Comment


          #5
          Thank you

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          81 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          42 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
          66 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          54 views
          0 likes
          Last Post CarlTrading  
          Working...
          X