Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Memory Issue with OHL?

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

    #16
    Originally posted by koganam View Post
    Looking at the code of the indicator shows that on each BarUpdate, it is running 3 for loops over the entire length of the chart.

    That means NT has to iterate through the domain to find the correct instance of the indicator, then run 3 for loops. If you are using COBC = false, then it must do this for every tick. (Remember the magic wrapper code that NT places at the bottom of the indicators, and warns you not to even glance at?) A nasty "fine how do you do" right there.

    One way to reduce the load, especially if using COBC = false, is to use a named instance of the indicator class. That way, NT knows exactly which code location to call, without having to go look for it.
    Forgive my ignorance in this case, koganam, but can you explain the concept behind the 3 for loops, and in addition, how you have determined this about the code?

    BTW, COBC will be set to true for this strategy, it is not in indicator format, if that makes a difference.

    Thanks in advance for any help,


    Andrew

    Comment


      #17
      Originally posted by alabell View Post
      Forgive my ignorance in this case, koganam, but can you explain the concept behind the 3 for loops, and in addition, how you have determined this about the code?

      BTW, COBC will be set to true for this strategy, it is not in indicator format, if that makes a difference.

      Thanks in advance for any help,


      Andrew
      Just look at the code in the editor, and you will see that there are 3 for loops that loop over the barSeries.Count.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Tim-c, Today, 03:54 AM
      0 responses
      3 views
      0 likes
      Last Post Tim-c
      by Tim-c
       
      Started by FrancisMorro, Today, 03:24 AM
      0 responses
      2 views
      0 likes
      Last Post FrancisMorro  
      Started by Segwin, 05-07-2018, 02:15 PM
      10 responses
      1,771 views
      0 likes
      Last Post Leafcutter  
      Started by Rapine Heihei, 04-23-2024, 07:51 PM
      2 responses
      31 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by Shansen, 08-30-2019, 10:18 PM
      24 responses
      945 views
      0 likes
      Last Post spwizard  
      Working...
      X