pullback 52 week high

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #237030 quote
    marco7630
    Participant
    New

    Hi,

     

    Could you help me with following:

    I would like to see all the stocks on daily timeframe that meet the following requirements:

    1. The stocks are within 85% of the 52 week high
    2. The 52 week high should have been within the last 10 daily candles

    Gr Marco

    #237050 quote
    robertogozzi
    Moderator
    Master

    There you go:

    Timeframe(Weekly)
    ONCE N = 10
    high52 = highest[52](high)
    Timeframe(Daily)
    Cond1 = close <= (high52 * 0.85)
    BarID  = -1
    FOR i = 0 TO (N - 1)
       IF (high[i] = high52) THEN
          BarID = i
          break
       ENDIF
    NEXT
    Cond2 = (BarID >= 0)
    Screener[Cond1 AND Cond2 AND (high <> low)](BarID AS "Bars")
    Iván González thanked this post
    #237051 quote
    Iván González
    Moderator
    Master

    Hi, to do everything with the same timeframe I have set the annual maximum to daily (252 bars).

    lmax=highest[252](close)
    bars=barssince(close=lmax)
    
    c1=close>0.85*lmax
    c2=bars<=10 and bars>=0
    
    SCREENER[c1 and c2](bars as "bars")
    #237067 quote
    marco7630
    Participant
    New

    Thanks.

    What would the code be if i want:

    1. The stocks are within 85% of the 52 week low
    2. The 52 week low should have been within the last 10 daily candles

    gr Marco

    #237072 quote
    Iván González
    Moderator
    Master

    The same…

    lmin=lowest[252](close)
    bars=barssince(close=lmin)
    
    c1=close<1.15*lmin
    c2=bars<=10 and bars>=0
    
    SCREENER[c1 and c2](bars as "bars")
    #237075 quote
    marco7630
    Participant
    New

    thanks

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

pullback 52 week high


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
marco7630 @marco7630 Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by marco7630
1 year, 6 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 09/02/2024
Status: Active
Attachments: No files
Logo Logo
Loading...