Hi,
I have the screener below. I want to test it on historical dates. Suppose i want to see all the results of this screener on 20-08-2025. What do i need to change in screener?
TimeFrame(Daily)
c18=Average[30](Volume)[1]*Close[1]>1000000
c17=Average[30](Volume)*Close>4000000
C3=Close>1
C14=Volume>1.5*Average[30](Volume)
ema50= ExponentialAverage[50](close)
c4 = ema50>=ema50[1]
ATRpercent=100*(AverageTrueRange[14](close))/close
c5 = ATRpercent>=2
c6=close>close[1]
c11=close>ema50
c15=(high-close)<0.25*(high-low)
C16=(Close-Close[1])/Close[1]*100>atrpercent
Screener[ C3](Volume as “Volume”)
timeframe (weekly)
EMA40=ExponentialAverage[40](Close)
EMA30=ExponentialAverage[30](Close)
EMA10=ExponentialAverage[10](Close)
c12=close>EMA40 and close>ema30 and close>ema10
High52 = highest[52](high[1])
//>
Timeframe(default)
c22 = close >= High52
c23 = high <> low
condition = c3 and c4 and c5 and c6 and c12 and c11 and c14 and c15 and c22 and c23 and c16 and c17 and c18
SCREENER[condition]
gr Marco
JSParticipant
Senior
Hi,
A screener only evaluates the current (live) bar…
You could apply a possible workaround by calculating how many days the given date is away from the current bar — in other words, by computing the size of the “shift” between that date and the present bar — (but a screener is not really designed for that purpose)…
A other approach would be to first create an indicator that uses the given date and then “call” that indicator from your screener…
@marco7630
Do not double post. Ask your question only once and only in one forum. All double posts will be deleted anyway so posting the same question multiple times will just be wasting your own time and will not get you an answer any quicker. Double posting just creates confusion in the forums.
Thanks 🙂
I deleted the post (and the replies, as well) you appended to another topic.
Hi! Here you have an example:
mydate=20250820
for i=1 to 250 do
if date[i]=mydate then
bars=i-1
endif
next
sma30 = average[30](close)
sma150 = average[150](close)
setup = sma30[bars] crosses over sma150[bars]
SCREENER[setup](close as "close")