market breadth issues

Optuma Forums Optuma Scripting market breadth issues

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #63615
    AvatarJoshua
    • Topics: 10
    • Replies: 12
    • Posts: 22

    hi there, i’ve created a custom breadth measure that calculates the percentage of nasdaq 100 (ndy) constituents that are exceeding a respective moving average (20ma in this example).

    i’ve attached the script and a screenshot of the results.

    please advise what i’m doing incorrectly.  i’ve restarted optuma, downloaded history, as well as updated breadth.

    any help appreciated.

    Attachments:
    #63622
    MatthewMatthew
    • Topics: 5
    • Replies: 366
    • Posts: 371

    Hi,

    The problem is with the script using Last().

    That function will use the last closing price of the chart for all dates covered.  Here is an example of the same script on a Show View, see how the blue line for Last() is horizontal.

    Ex4

    To achieve the result you are after you need to change Last() to Close()

    Ex5

    Once this is done the breadth code returns the expected results.

    Ex6

    #63695
    AvatarJoshua
    • Topics: 10
    • Replies: 12
    • Posts: 22

    Hi Matthew,

    Thanks for the response.. still having the same issue however.  any advice?

    breadth

    #63697
    AvatarJoshua
    • Topics: 10
    • Replies: 12
    • Posts: 22

    Hi Matthew,

    Thanks for the response.. still having the same issue however.  any advice?

    breadth

    #63708
    MatthewMatthew
    • Topics: 5
    • Replies: 366
    • Posts: 371

    Hi,

    Had you already opened the chart before changing the script and rebuilding?  If so it is possible the data was in memory and cached, so the new data could not be written.  Try using the new script with a new code (no existing cache) and see how you go.  If the issue remains please contact support@optuma.com for assistance.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest