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 sjsj2732, 03-23-2026, 04:31 AM
          0 responses
          42 views
          0 likes
          Last Post sjsj2732  
          Started by NullPointStrategies, 03-13-2026, 05:17 AM
          0 responses
          294 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          290 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          135 views
          1 like
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          98 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Working...
          X