252 day EMA trending up script

Optuma Forums Optuma Scripting 252 day EMA trending up script

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #66767
    Yi Jun
    • Topics: 3
    • Replies: 2
    • Posts: 5

    I need help scripting for 252 day EMA trending up for at least 1 month. I’m trying to scan for stocks that have 252 day EMA trending up for at least 1 month, but I do not know how to code for it.

    #66777
    Darren
    • Topics: 70
    • Replies: 871
    • Posts: 941

    Hi Yi Jun,

    You can use the IsUp and BARSTRUE functions to show when the condition has been true for 22 trading days (about a month):

    1 user thanked author for this post.
    #66791
    Darren
    • Topics: 70
    • Replies: 871
    • Posts: 941

    Here’s another option using the Linear Regression Slope tool, which is a little more forgiving if there’s a small blip in the EMA direction, but the overall trend is up over the last 22 days:

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

Pin It on Pinterest