Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

VolumeUpDown : Clarification/Explaination

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

    VolumeUpDown : Clarification/Explaination

    (This is an example from the Ninjatrader Forum)

    Please try VolumeUpDown().Values[0][0] and VolumeUpDown().Values[1][0].

    [0][0] being up.
    [1][0] being down.


    In the VolumeUpDown call in Ninjatrader 7, could you please give me an explanation of how the values passed are being are being used and what is returned?

    For example when I pass a [0][0] will my return value only be the current bar's Up volume ?
    And when I pass a [1][0] will my return value only be the current bars Down volume ?

    Thanks Jack




    #2
    Hello jkt1120,

    Thank you for your post.

    Values refers to a plot added to the script using the Add() method. Since the first plot added to the script is UpVolume, you would use Values[0][0] to get a value for the Up Volume. The second plot added to the script is DownVolume. You would use Values[1][0] to get a value for the Down Volume.

    See the help guide documentation below for more information.

    Values - https://ninjatrader.com/support/help...nt7/values.htm

    If you view the source code for the VolumeUpDown indicator by selecting Tools > Edit NinjaScript > Indicator > VolumeUpDown, we are able to see which plot is added first and how the plots are referred to using Values. In the script, if the close is greater than the open, the script assigns Volume[0] to Values[0] and resets Values[1]. Otherwise, Values[1] is assigned the value Volume[0] and Values[0] is reset.

    Please let us know if we may further assist.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    599 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    344 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    558 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    557 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X