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 futtrader, 04-21-2024, 01:50 AM
        5 responses
        56 views
        0 likes
        Last Post NinjaTrader_Eduardo  
        Started by PeakTry, Today, 10:49 AM
        0 responses
        2 views
        0 likes
        Last Post PeakTry
        by PeakTry
         
        Started by llanqui, Today, 10:32 AM
        0 responses
        5 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by StockTrader88, 03-06-2021, 08:58 AM
        45 responses
        3,992 views
        3 likes
        Last Post johntraderuser2  
        Started by TAJTrades, Today, 09:46 AM
        0 responses
        8 views
        0 likes
        Last Post TAJTrades  
        Working...
        X