Announcement

Collapse
No announcement yet.

high() and low() unexpected null returns

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

  • high() and low() unexpected null returns

    Hi
    Someone please remind me what I'm doing wrong, I'm trying to step back through the high() and low() values of previous bars. It works for the previous candle (-1) but not for a general negative number. [Edit: It also works when processing historic bars, but fails when we get to the current bar.]

    I think
    PHP Code:
    nVal high(nCandle); 
    should access the high values for the symbol and interval of the current chart and return a valid value for any nCandle (a negative) which, as I don't do this until we get to the current bar, is not a value greater in magnitude than the number of bars in the chart. I get null as the return, eSig 10.0.

    I can't work it out.

    Thanks
    Last edited by Dave180; 06-05-2008, 11:18 AM.

  • #2
    Dave180
    As far as I can see at my end calling any previous bar using the bar index [as long as it does not exceed the oldest bar index] while on the most recent bar appears to be returning the correct value (see enclosed screenshots).
    You may want to post a more detailed example so as to try to identify what the issue may be
    Alex






    Originally posted by Dave180
    Hi
    Someone please remind me what I'm doing wrong, I'm trying to step back through the high() and low() values of previous bars. It works for the previous candle (-1) but not for a general negative number. [Edit: It also works when processing historic bars, but fails when we get to the current bar.]

    I think
    PHP Code:
    nVal high(nCandle); 
    should access the high values for the symbol and interval of the current chart and return a valid value for any nCandle (a negative) which, as I don't do this until we get to the current bar, is not a value greater in magnitude than the number of bars in the chart. I get null as the return, eSig 10.0.

    I can't work it out.

    Thanks

    Comment


    • #3
      Alexis, my apologies, I never saw your response (I think the advisory emails sometimes don't arrive), and meanwhile I think I hard-coded an array and loop to get around the problem. I'll look again shortly.

      Comment

      Working...
      X