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 charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          73 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          152 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          162 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          100 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          288 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X