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 kujista, Today, 05:44 AM
        0 responses
        6 views
        0 likes
        Last Post kujista
        by kujista
         
        Started by ZenCortexCLICK, Today, 04:58 AM
        0 responses
        8 views
        0 likes
        Last Post ZenCortexCLICK  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        172 responses
        2,281 views
        0 likes
        Last Post sidlercom80  
        Started by Irukandji, Yesterday, 02:53 AM
        2 responses
        18 views
        0 likes
        Last Post Irukandji  
        Started by adeelshahzad, Today, 03:54 AM
        0 responses
        11 views
        0 likes
        Last Post adeelshahzad  
        Working...
        X