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:
EndTime = 141500
If (Time < EndTime) THEN
Filter = <your filter on pattern>
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.
Warning: Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced clients who have sufficient financial means to bear such risk. The articles, codes and content on this website only contain general information. They are not personal or investment advice nor a solicitation to buy or sell any financial instrument. Each investor must make their own judgement about the appropriateness of trading a financial instrument to their own financial, fiscal and legal situation.