Hi,
Could you help me with following:
I would like to see all the stocks on daily timeframe that meet the following requirements:
- The stocks are within 85% of the 52 week high
- The 52 week high should have been within the last 10 daily candles
Gr Marco
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")
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")
Thanks.
What would the code be if i want:
- The stocks are within 85% of the 52 week low
- The 52 week low should have been within the last 10 daily candles
gr Marco
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")