♥ 0 |
Hi Pete, I did go through all tour 31 pages and ddid not see this topic, forgive me if I missed it. I am looking to translate a condition for scanning stocks that are up $1 in premarket from TC 2000. The formula in TC2000 is very simple C-O >= .90 Not sure how can I adapt in TOS to work in Pre-Market Thank you.
Marked as spam
|
Private answer
There is nothing you can do in the code that forces it to work in premarket hours. The only way to run a scan in premarket hours is to set the study filter to intraday time frame and check the box to include extended hours. Which means you can NOT use this:
Because that will not work, the code will need to use recursion to capture and hold the previous day's close. Then compare that to the close of whatever bar is active at the time you run the scan. The code for this was demonstrated here: https://www.hahn-tech.com/ans/after-hours-gap-scanner/ However that solution was checking for a gap based on a percentage value. You are asking for the same exact thing except you need it to be based on the actual value. Here is the code from that post, adapted to check if current bar's close is greater than or equal to previous day's close plus 0.9: I have NOT tested this. So please check it out and let me know if it does not work the way I described.
Marked as spam
|
Please log in to post questions.