Announcement

Collapse
No announcement yet.

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.

    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 -

        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 Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          576 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X