Extended hours Gap Percent Scan


Category:
0
0

Hey Pete!  Don’t roast me just yet I’ve been through all ( I think all) the posts and I cannot find an example of just how to say +/- 2%.  I know I can use this post to find the previous close https://www.hahn-tech.com/ans/gap-to-previous-day-close-scan/ but I’m unsure of how to get the current am/pm price.

 

Thanks!

Marked as spam
Posted by (Questions: 10, Answers: 15)
Asked on June 21, 2020 5:08 pm
174 views
0
Private answer

...how to get the current am/pm price...

def currentPrice = close; The End

https://www.hahn-tech.com/ans/help-making-pre-market-gap-scanner-more-efficient/

Contrary to what every single person on this planet believes, (self excluded), the current price during any portion of the trading day is the close. There are no special tricks required to get the current price during premarket, post market or martian time zone market. The close is the current price ALWAYS. Period. Now, go share this with every person on the planet so we can get everyone on the same page. I cannot even count the number of times I have had to explain this to folks and they resist even when given full and incontrovertible proof.

The code at the very bottom of the post I linked above is exactly what you have requested. It even includes a user input to adjust the percent threshold, with a default value of 2.0%. Be sure to read my comments and instructions so you understand where that code came from and how it was adapted to the specific request in that post, and more importantly, how to adjust it to fit your current request.

Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on June 21, 2020 6:15 pm