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

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 samish18, Today, 01:01 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by WHICKED, Today, 12:56 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by cre8able, Today, 01:16 PM
    0 responses
    3 views
    0 likes
    Last Post cre8able  
    Started by chbruno, 04-24-2024, 04:10 PM
    2 responses
    47 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by WHICKED, Today, 12:45 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X