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 cre8able, Yesterday, 01:16 PM
        3 responses
        11 views
        0 likes
        Last Post cre8able  
        Started by ChartTourist, Today, 08:22 AM
        0 responses
        6 views
        0 likes
        Last Post ChartTourist  
        Started by LiamTwine, Today, 08:10 AM
        0 responses
        2 views
        0 likes
        Last Post LiamTwine  
        Started by Balage0922, Today, 07:38 AM
        0 responses
        5 views
        0 likes
        Last Post Balage0922  
        Started by JoMoon2024, Today, 06:56 AM
        0 responses
        6 views
        0 likes
        Last Post JoMoon2024  
        Working...
        X