Dollar Breakout Pre-market


Category:
0
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
Posted by (Questions: 1, Answers: 1)
Asked on August 31, 2019 2:57 pm
151 views
0
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:

plot scan = close - open >= 0.9;

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.

Edit: Opps! Forgot to include the code. Here it is:

input marketClose = 1600;
def closeCounter = SecondsTillTime(marketClose);
def regSessEnd = closeCounter[-1] == 0;
rec priorDayClose = if regSessEnd then close else priorDayClose[1];
plot scan = close - priorDayClose >= 0.9;

Marked as spam
Posted by (Questions: 37, Answers: 4108)
Answered on August 31, 2019 3:54 pm
0
Hi Pete, thank you so much for your prompt response. I just don’t see the code you adapted for me on the post. Did I missed something? Thank you
( at August 31, 2019 4:36 pm)
0
You're right. Sorry about that. I have updated my response to include the code.
( at August 31, 2019 8:31 pm)
0
Thank you Pete, I will try it next week and post the results. Seems like it should work just fine.
( at September 1, 2019 9:11 am)