script for close of yesterday and close of today

Optuma Forums Optuma Scripting script for close of yesterday and close of today

This topic contains 1 reply, has 2 voices, and was last updated by Matthew Matthew 2 weeks, 3 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #47443

    Gareth
    • Topics: 3
    • Replies: 0
    • Posts: 3

    I am trying to write script for:

    close of yesterday < 7 day MA

    close of today > 7 day MA and

    close of today > high of yesterday (ignoring inside days)

    Thanks

     

    #47447
    Matthew
    Matthew
    • Topics: 3
    • Replies: 58
    • Posts: 61

    Hi Gareth,

    The first two criteria can be handled with a single line of script:

    This script uses the default Moving Average which is a 5SMA.

    The second criteria would use:

    You would then combine them into a single script:

     

Viewing 2 posts - 1 through 2 (of 2 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