LOWESTLOW() – Zero Values

Optuma Forums Optuma Scripting LOWESTLOW() – Zero Values

This topic contains 2 replies, has 2 voices, and was last updated by  Liam 9 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #44491

    Liam
    • Topics: 2
    • Replies: 2
    • Posts: 4

    Hi,

    I’m trying to create something akin to the NR4\NR7 indicator. See here -> http://thepatternsite.com/nr7.html

    Here is my current script:

    RANGE = HIGH()-LOW();
    RANGELOW= LOWESTLOW(RANGE, BARS=6, INSIDEBAR=True, EQUAL=False, INCBAR=True, SIGNALONLY=False);

    Plot1 = RANGE;
    Plot2 = RANGELOW;

    Plot1.Plotstyle = Histogram;

    RANGE < RANGELOW;

    When I use the indicator in a SSHOWBAR(), I get this:

    2018-01-13_15-24-08

    The bar indicated by the red arrow is being shown as the narrowest of the past 7 days when clearly 2 bars before the range was zero.

    The LOWESTLOW function does not seem to count zero values by default. Is there a way to make it do so?

    #44499
    Mathew
    Mathew
    • Topics: 14
    • Replies: 792
    • Posts: 806

    Hi Liam,

    There does appear to be an issue with LowestLow when the range is 0. I added a couple of plots to see, the blue line should have gone to 0 after the 0 range bar. Because 0 can mean that we have no data, it is sometimes ignored. In a datalist that makes sense, but does not help in this case. We’ll need to get that looked at.

    In the mean time, the simple way to get around this is to add 10 to the range.

    RANGE = HIGH()-LOW() + 10;

    It’s not “correct” but gets you the results you are after.

    Hope that helps

    Mathew.

    ll

    All the best

    Mathew.

    #44503

    Liam
    • Topics: 2
    • Replies: 2
    • Posts: 4

    Fantastic Matthew. That works great. Thanks for your help.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Pin It on Pinterest

Share This

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close