Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Volume percentage?

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

    Volume percentage?

    How would I search in my strategy for when Volume is less than a certain percentage of its typical average over a period of time? thanks

    Volume[0] < (MAX(14)[0] * 0.2 ?

    #2
    I was using the volume found in the price list, not the one found in the indicator list btw

    Comment


      #3
      Hello ezrollin,

      You could call the SMA if you want an average of the volume.

      SMA(Volume, 14)[0]

      Or you could calculate this yourself.

      long aggregatedVolume = 0;

      for (int i = 0; i < 14; ++i)
      aggregatedVolume += Volume[i];

      Print(aggregatedVolume / 14);
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Thank you but I'm trying to do it in builder. Is that possible? I'm good at builder but I cant figure it out. Maybe I can use one of the volume indicators I have? thanks

        Comment


          #5
          Hello ezrollin,

          In the Strategy Builder you could use the SMA with the Volume as the Input series.

          Math is only available to Series with the offset. The issue trying to aggregate the volume and divide by number of bars would be aggregating only the last 14 bars.

          Something like this would likely need to be done by hand in an unlocked script.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, 03-13-2026, 05:17 AM
          0 responses
          86 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          151 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          79 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          52 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          59 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X