Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error in log on running simple volume check

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

    Error in log on running simple volume check

    I am trying to create some simple volume based indicators. When I create a new indicator and use the following code:

    if (Volume[0] >= Volume[1] * 1.10)
    DrawDiamond("Volume Spike" + CurrentBar, 0, Low[0] - TickSize, Color.Red);

    it compiles fine but when I apply it nothing shows up on the screen and I get the following error message in the log:

    Error on calling the 'OnBarUpdate' method for indicator 'AAATest' on bar 0: Index was out of range. Must be non-negative and less than the size of the collection.

    Any ideas on what the problem might be? I am running 6.0.1000.9.

    Thanks

    #2
    The following tip will answer your question -

    RayNinjaTrader Customer Service

    Comment


      #3
      The devil is in the detail Thanks for the incredibly fast answer.....

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      161 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      311 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
      350 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