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

Volume[1] nothing return

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

    Volume[1] nothing return

    Hi

    in my indicator Close[1] or Hight[1] return right value.
    But why Volume[1] nothing return ?

    How I can get value Volume[n] ?

    Tnkx

    #2
    Any errors in the log tab? Both Volume[1] and VOL()[1] should work for accessing the previous bar's volume.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Any errors in the log tab? Both Volume[1] and VOL()[1] should work for accessing the previous bar's volume.
      Pls, try it on Y's comp :
      - create indicator in Wizard (Tools-NewScript-Indicator)
      - change Close[0] on Volume[1] in code

      protectedoverridevoid OnBarUpdate()
      {
      // Use this method for calculating your indicator values. Assign a value to each
      // plot below by replacing 'Close[0]' with your own formula.

      //Plot0.Set( Close[0] );
      Plot0.Set( Volume[
      1] );
      ...
      and Y can look - indicator not plote value
      but if write
      Plot0.Set( Volume[0] );
      all right plot.

      Where error ?

      Comment


        #4
        Did you add the needed CurrentBar's check at the OnBarUpdate start? Likely not, thus you run into this issue here accessing the previous bar info -

        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          Did you add the needed CurrentBar's check at the OnBarUpdate start? Likely not, thus you run into this issue here accessing the previous bar info -

          http://www.ninjatrader-support2.com/...ead.php?t=3170
          Thnx
          Thnx
          Thnx

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by fx.practic, 10-15-2013, 12:53 AM
          5 responses
          5,406 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Started by Shai Samuel, 07-02-2022, 02:46 PM
          4 responses
          98 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Started by DJ888, Yesterday, 10:57 PM
          0 responses
          8 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by MacDad, 02-25-2024, 11:48 PM
          7 responses
          160 views
          0 likes
          Last Post loganjarosz123  
          Started by Belfortbucks, Yesterday, 09:29 PM
          0 responses
          9 views
          0 likes
          Last Post Belfortbucks  
          Working...
          X