Announcement

Collapse
No announcement yet.

weird behaviour code stops running

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

  • weird behaviour code stops running

    I am running latest version of 10.5

    I store a bar index value of a previous bar in a variable, pLn.

    I reference this previous bar value by using the low() function.

    When I do this, my code stops running and returning valid information. Very similar to memory corruption.

    Has anyone seen this isssue
    even if I put a debugPrintln statement in to reference this to the console I get the problem.

    also, if I put low(-1007) in there, it does it was well. Has anyone seen this?

    Update there are 1114 bars on the chart.
    If reference low(-1104) it works
    if I reference anything beyond that
    i.e. low(-1105) it crashes
    Seems when you try to peek at the last 10 bars on the chart(or first ten) it causes a corruption problem.
    Last edited by philli4093; 09-16-2009, 12:35 PM.

  • #2
    Re: weird behaviour code stops running

    philli4093
    Calling the low of the oldest 10 bars seems to be working at my end (see enclosed screenshot)
    You may want to post some code that illustrates the issue
    Alex




    Originally posted by philli4093
    I am running latest version of 10.5

    I store a bar index value of a previous bar in a variable, pLn.

    I reference this previous bar value by using the low() function.

    When I do this, my code stops running and returning valid information. Very similar to memory corruption.

    Has anyone seen this isssue
    even if I put a debugPrintln statement in to reference this to the console I get the problem.

    also, if I put low(-1007) in there, it does it was well. Has anyone seen this?

    Update there are 1114 bars on the chart.
    If reference low(-1104) it works
    if I reference anything beyond that
    i.e. low(-1105) it crashes
    Seems when you try to peek at the last 10 bars on the chart(or first ten) it causes a corruption problem.

    Comment


    • #3
      Could I email you something directly?

      Comment


      • #4
        This is really weird.

        I removed a bunch of comments from the code--about 100 lines, and now things seem to be working. That reference is not causing the behavior it once was. I will continue testing,

        thanks

        Comment

        Working...
        X