Price over the max/under the low

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #181067 quote
    Francesco
    Participant
    Veteran

    Hello,

    I would like to create a screener that shows me all the assets that have crossed over in the last x days the highest price occurred in the last y days and another one that shows me the opposite (assets that have crossed under in the last x days the minimum price occurred in the last y days).

    Any suggestions? Thanks.

    #181069 quote
    robertogozzi
    Moderator
    Master

    There you go:

    screener #1

    // prices having crossed over the Y-period HIGHEST price in the last X bars
    Y  = 100
    X  = 5
    HH = highest[Y](high)
    c1 = summation[X](close CROSSES OVER HH[1])
    SCREENER[c1]

    screener #2

    // prices having crossed under the Y-period LOWEST price in the last X bars
    Y  = 100
    X  = 5
    LL = lowest[Y](low)
    c1 = summation[X](close CROSSES UNDER LL[1])
    SCREENER[c1]
    Francesco thanked this post
    #181116 quote
    Francesco
    Participant
    Veteran

    Thanks Roberto you are SUPER as always; the screener works exactly as i was expecting, but i would like to add a pinch of salt.

    It is possible to create a screener that shows me all the assets that have crossed over in the last x days for the first time the highest price occurred in the last y days.

    I’ll explain better: in photo 1 we can see an asset that crossed over the highest multiple times during the showed period of time.

    In photo 2 we can see an asset that crossed over the highest for the first time during the showed period of time.

    It is possible to filter just cases like photo 2?

    Thanks.

    1.jpg 1.jpg 2.jpg 2.jpg
    #181120 quote
    robertogozzi
    Moderator
    Master

    Yes, bear in mind that ProScreener still has a 254-bar limit with IG (PRT extended it to 1024 a few months ago, instead).
    There you go (not tested):

    Screener #1

    // prices having crossed over the Y-period HIGHEST price in the last X bars
    // for the first time since Y periods ago
    //
    Y  = 100
    X  = 5
    HH = highest[Y](high)
    c1 = summation[X](close CROSSES OVER HH[1])
    c2 = (summation[Y - X](close CROSSES OVER HH[X + 1]) = 0)
    SCREENER[c1 AND c2]

    Screener # 2

    // prices having crossed under the Y-period LOWEST price in the last X bars
    // for the first time since Y periods ago
    Y  = 100
    X  = 5
    LL = lowest[Y](low)
    c1 = summation[X](close CROSSES UNDER LL[1])
    c2 = (summation[Y - X](close CROSSES UNDER LL[X + 1]) = 0)
    SCREENER[c1 AND c2]
    Francesco thanked this post
    #181125 quote
    Francesco
    Participant
    Veteran

    Looks like it’s not working properly… i don’t even know if my idea is possible to realize 😀

    #181126 quote
    robertogozzi
    Moderator
    Master

    It should  scan 100 periods and check that a  crossover occurred in the last 5 periods, but NOT in the previous 95 periods.

    #181138 quote
    Francesco
    Participant
    Veteran

    It should scan 100 periods and check that a crossover occurred in the last 5 periods, but NOT in the previous 95 periods.

    That’s exactly what i would like to see.

    But look at this example, seems there’s something not working.

    example-1.png example-1.png
    #181203 quote
    robertogozzi
    Moderator
    Master

    Your example was returned or not?

    It seems to be working fine  for me.

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

Price over the max/under the low


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by robertogozzi
4 years, 4 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 11/05/2021
Status: Active
Attachments: 3 files
Logo Logo
Loading...