Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

vol max and min

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

    vol max and min

    If I use a SMA, (SMA(myVar, period)[0]); on volume, is it possible to then see the max and min volume during this period?

    If so, can I get a syntax example?

    Thank you.

    #2
    Hello imalil,

    Thanks for your post.

    The SMA would not provide for a Minimum and Maximum over its period but the average value of the period.

    To determine a Minimum and Maximum over a period you would use the MIN() and MAX() methods.

    For example:

    double minVolume = MIN(Volume, 10)[0]; // Minimum volume in 10 bar lookback
    double maxVolume = MAX(Volume, 10)[0]; // Maximum volume in 10 bar lookback

    References:
    http://ninjatrader.com/support/helpG...inimum_min.htm
    http://ninjatrader.com/support/helpG...aximum_max.htm

    Edit: Changed reference links from NT7 to NT8.
    Last edited by NinjaTrader_PaulH; 01-05-2017, 08:29 AM.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks, Paul.

      I posted on NT8 forum. You linked a NT7 answer. Are they exactly the same?

      Comment


        #4
        Hello imalil,

        Thanks for your reply.

        The examples and syntax are the same.

        I will edit my first post with the correct links for NT8. Thank-you
        Last edited by NinjaTrader_PaulH; 01-05-2017, 08:30 AM.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by algospoke, Today, 06:40 PM
        0 responses
        2 views
        0 likes
        Last Post algospoke  
        Started by maybeimnotrader, Today, 05:46 PM
        0 responses
        6 views
        0 likes
        Last Post maybeimnotrader  
        Started by quantismo, Today, 05:13 PM
        0 responses
        6 views
        0 likes
        Last Post quantismo  
        Started by AttiM, 02-14-2024, 05:20 PM
        8 responses
        168 views
        0 likes
        Last Post jeronymite  
        Started by cre8able, Today, 04:22 PM
        0 responses
        8 views
        0 likes
        Last Post cre8able  
        Working...
        X