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.
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by fdalgoi, Today, 12:44 AM
    0 responses
    1 view
    0 likes
    Last Post fdalgoi
    by fdalgoi
     
    Started by thomaswilleford, Today, 12:07 AM
    0 responses
    3 views
    0 likes
    Last Post thomaswilleford  
    Started by dlygorivw, Yesterday, 10:55 PM
    0 responses
    2 views
    0 likes
    Last Post dlygorivw  
    Started by dlygorivw, Yesterday, 10:53 PM
    0 responses
    4 views
    0 likes
    Last Post dlygorivw  
    Started by janiyaconnelly, Yesterday, 10:41 PM
    0 responses
    3 views
    0 likes
    Last Post janiyaconnelly  
    Working...
    X