Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Index was outside the bounds of the array

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

    #16
    Maybe we should have a Refactor My Code Sub Forum

    Questions like this are not easily answered without the code, or with only code snippets. Ricam is answering the question, but with out demonstarting it by refactoring the code in question.. which was never posted... it's hard to get the point across.

    Comment


      #17
      Originally posted by ch9090 View Post
      Is it the equivalent (in a more sophisticated way) of the minimum bars required (backtest)?
      Right, the strategy has built in handling for the first few bars with Minimum Bars Required. Indicators will need this custom coded. The following post can help with these techniques:
      Ryan M.NinjaTrader Customer Service

      Comment


        #18
        Thank you Crassius, I didn't want to bother the board members with my code but you're right. Next time I'll post it so it is clearer and thus easier to solve.

        I need to do some furhter testing with the DMIndex as it seems to easily generate memory exception errors contrary to the RSI that works fine. Strange because the DMIndex is an upgraded RSI.

        More in the next episode :-)

        All the best, Chris

        Comment


          #19
          Refactoring, and optimization for memory usage.

          Originally posted by Crassius View Post
          Maybe we should have a 'refactor my code' forum
          Crassius - I think this would be a great idea. On a similar note - I have, so far, seen no discussion in these forums, into the optimization of code to improve memory usage - especially that which is non-linear...

          I've recently developed a set of techniques to benchmark / query memory usage over time or iterations, and export the data to a spreadsheet for analysis and reporting. I find this extremely useful in optimizing my code and in isolating problematic sections, and I believe the importance of this is widely neglected when attempting to perform parametric cross-optimization.

          I need to tidy up the code a little, but once I'm done I would be happy to post it here, and write a short article on this topic. Perhaps we could get a dedicated sticky?

          I'm fairly busy right at the moment, so will likely be at some point next week.

          J

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by sjsj2732, Yesterday, 04:31 AM
          0 responses
          36 views
          0 likes
          Last Post sjsj2732  
          Started by NullPointStrategies, 03-13-2026, 05:17 AM
          0 responses
          287 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          287 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          133 views
          1 like
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          95 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Working...
          X