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 Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          601 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          347 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          559 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          558 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X