Creating Pullback scan criteria

Optuma Forums Optuma Scripting Creating Pullback scan criteria

This topic contains 2 replies, has 2 voices, and was last updated by Avatar Tonia 3 weeks, 5 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #53803
    Avatar
    Tonia
    • Topics: 4
    • Replies: 4
    • Posts: 8

    Hi Guys

    I’m trying to create a scan identifying a year high, which I know how to do, but which then subsequently identifies the 20 day low occurring after the Year High, but which must occur within the following 50 days after the Year High occurs.  I know identifying the 20 day low would be a similar scripting method as identifying the year high, but it is time since or offset period where I am getting confused, could someone help please. I want to make sure the 20 day low occurs after the Year High but within a 50 day period, which will eliminate prolonged congestion periods.

     

    #53805
    Darren
    Darren
    • Topics: 37
    • Replies: 238
    • Posts: 275

    Hi Tonia,

    You can use the TIMESINCESIGNAL() function (see examples here and here).

    It’s always good practice to break things down in to the separate components as a Show Bar – so you can verify that the script formulas are doing what you want them to do. In this example the green Show Bars are the new 52 week high closes (Y1), and the red ones are the new 20 day lows(L20). The green shaded areas are when the lows occur within 50 bars of the new highs, created using a Show View tool with the following formula (and true/false in the watchlist column).

    Capture

    #53815
    Avatar
    Tonia
    • Topics: 4
    • Replies: 4
    • Posts: 8

    Thank you Darren, I really appreciate 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

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