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 Rapine Heihei, 04-23-2024, 07:51 PM
        2 responses
        30 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        943 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        9 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by rocketman7, Today, 01:00 AM
        0 responses
        5 views
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        28 views
        0 likes
        Last Post wzgy0920  
        Working...
        X