Hi
I want to develop a scan who select stocks based on intraday criteria, for instance a pattern on a 5 minutes chart and I want to test it on a past date.
How can I specify to the intraday scanner the specific date in the past to run the scan, different from the default latest market day?
For instance if I see the signal conditions appeared on stock X last Wednesday at 14:10 on a five minutes candle I would like to be able to specify Wednesday date to the scanner and check that the stock gets actually selected at that time.
I can easily select the time of the day and it works fine on last day data, but I do not know how to specify a different date in the past.
To select the time to test the filter on last market day, knowing there was a signal on a 5 minutes candle starting at 14:10, the code is:
TIMEFRAME(5 minutes)
EndTime = 141500
If (Time < EndTime) THEN
Filter = <your filter on pattern>
Endif
SCREENER[Filter](DAY AS “Date”)
This works fine on default latest market day.
I would expect there should be an environment variable to place at the beginning of the code that allows to specify a different date to run the scanner.
Thanks for any suggestion!
Giu