Unstable DU and DD

Optuma Forums Optuma Scripting Unstable DU and DD

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #61635
    AvatarJason
    • Topics: 2
    • Replies: 1
    • Posts: 3

    I’m looking at a watchlist with some major ETFs, and have noticed something odd that I can’t figure out. When adding a script column and using DU() or DD(), it will calculate correctly when first added. After about 10 seconds, it re-calculates and puts everything at either a 1 or 0. For the symbol XBI, for example, it will show a reading of 5 (correctly) and then after about 10 seconds, changes that to 1. I’ve tried forcing the time frame to “day”, etc, and nothing seems to work – it keeps changing the values to 1 or 0. Any ideas on why?

    #61637
    DarrenDarren
    • Topics: 66
    • Replies: 589
    • Posts: 655

    Hi Jason,

    I think this is because you are using realtime data and it’s confusing the lookback counts. As a workaround use the following to count the number of consecutive days up, ie how long since a negative close:

    And days down:

    Let us know if you have issues.

    1 user thanked author for this post.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest