Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Volume()

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

    Volume()

    Hi Guys,

    Is this the correct syntax for the Checking that the average size of the most recent 8th volume bar is greater than 30% in size than the preceding volume bars.

    VOL()[0] > (VOL()[8]) * (1 + 0.3)

    How it will check the all previous 8 bars or the only previous single 8th bar.


    Thanks
    Imran.

    #2
    Hello Imran,

    Thank you for your note.

    Your syntax is correct however your logic is not.

    Your current code checks to see if the Vol current bar is 30% greater than the Vol of 8 bars ago.

    To check that the individual Vol bar 8 bars ago is 30% greater than the series preceding it you would to check that Vol bar 8 bars ago * 1.3 is greater than the Max of vol using 8 bars ago.
    For example:
    (Vol()[8] * 1.3) > Max(Vol(), 20)[9]
    Max(Input Series, period)[bars ago]

    The period of 20 refers to the amount of bars the Max function will look over. This is to prevent it looking through all of the available historical bars which would be very resource intensive when a lot of historical data is available.

    Below is a link to the help guide on using the Max function
    http://www.ninjatrader.com/support/h...aximum_max.htm

    Please let me know if I can be of further assistance.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi ChelseaB
      Thanks for the your valuable response. I want to check the current bar is greater than 30% of the preceding 8 volume bars. | | | | | | | |

      Please verify the code.

      (Vol()[0] * 1.3) > Max(Vol(), 8)

      Thanks
      Imran.
      Last edited by Imran; 02-18-2013, 05:25 PM.

      Comment


        #4
        Hello Imran,

        Thank you for the reply.

        The updated code you supplied checks that the last bar increased by 30% is greater than the last 8 bars of Vol().

        This logic is correct, however, I would make one change. You check that the current bar is greater than the last 8 bars. This will never be true as the last bar is included in the last 8 bars. The last bar will never be greater than itself. To correct this add 1 to the bars ago of the Max() call. This would exclude the last bar from the Vol series.

        For example:
        (Vol()[0] * 1.3) > Max(Vol(), 8)[1]


        Please let me know if I can still be of assistance.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        634 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X