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 Hwop38, 05-04-2026, 07:02 PM
          0 responses
          160 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          308 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          245 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          349 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          179 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Working...
          X